Oracle-不能在选择子句中的其他列上使用*符号 [英] Oracle - Can't use * sign with other column in select clause

查看:44
本文介绍了Oracle-不能在选择子句中的其他列上使用*符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

很抱歉,这很琐碎,但是选择带有*符号的列并不总是有效,而且我没有找到对此行为的引用.

Sorry if it's trivial, but selecting column with * sign isn't working always, and I don't find reference to this behavior.

我可以使用以下语句选择表A和列col:

I can select table A and column col with the following statements:

select * from A;select col from A;select aa.col,aa.* from A aa;

但是我无法一起查看:

select *,col from A;

将导致错误ORA-00923: FROM keyword not found

select col,* from A aa;

将导致错误ORA-00936: missing expression

为什么我必须对*符号使用别名?

Why i must use the alias for * sign ?

select col,aa.* from A aa;

为什么错误如此令人误解?

Why are the errors so misleading?

推荐答案

文档中没有对限制进行明确说明,但是您可以通过

The restriction is not so clearly stated in documentation, but you can find it by following this diagram.

在这里您看到,如果使用*,则选择列表中将无法使用其他任何内容

Here you see that if you use the *, you can't use anything else in select list

这篇关于Oracle-不能在选择子句中的其他列上使用*符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆