简体   繁体   中英

Bringing the other column , along all with all the other columns of the table (Oracle)

I am trying to Bringing the other column , along all with all the other columns of the table (Oracle)

As shown below

select order_id,person_id,col4,col5,* from orders

It is giving the below error :

ORA-00936: missing expression
00936. 00000 -  "missing expression"
*Cause:    
*Action:
Error at Line: 1 Column: 66

Any inputs would be helpful !!

Use an alias:

select col1, col2, c.*
from my_table c

您不能一起指定列* Oracle中的通配符,请尝试使用别名

select order_id as A,person_id  as B,col4  as C,col5  as D,* from orders

You cannot specify columns and the use a wildcard on the same query when doing a SQL SELECT.

This is due to projections and (as in relational algebra) projections requires that you specify attributes for selection.

In order to fully use projections, you either set attribute names and use alias (if you want to use wildcards).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM