我正在尝试将另一列以及表的所有其他列(Oracle)
如下所示
select order_id,person_id,col4,col5,* from orders
它给出了以下错误:
ORA-00936: missing expression
00936. 00000 - "missing expression"
*Cause:
*Action:
Error at Line: 1 Column: 66
任何输入都会有所帮助!
使用别名:
select col1, col2, c.*
from my_table c
在执行 SQL SELECT 时,您不能在同一查询中指定列和使用通配符。
这是由于投影和(如在关系代数中)投影要求您指定选择的属性。
为了充分使用投影,您可以设置属性名称并使用别名(如果您想使用通配符)。
您不能一起指定列 * Oracle 中的通配符,如果可能,请尝试使用别名
select order_id as A,person_id as B,col4 as C,col5 as D,* from orders