Alexander Razmakhnin
Alexander Razmakhnin

Reputation: 163

Missing Expression when selecting all columns and one more

This kind of query would work perfectly in SQL Server, but it does not work in Oracle.

select issueno, * from SOMETABLE;

The error message I'm getting is:

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

What is wrong?

Upvotes: 4

Views: 2310

Answers (2)

Scott Truesdell
Scott Truesdell

Reputation: 1

On Oracle you have to include the table name or an alias to use the *. Try this:

select issueno, SOMETABLE.*
from SOMETABLE;

Upvotes: 0

rs.
rs.

Reputation: 27467

Try this, when working with oracle db you need alias when you use column name along with *

select issueno, A.* from SOMETABLE A;

Upvotes: 7

Related Questions