FrenkyB
FrenkyB

Reputation: 7197

FROM keyword not found where expected - basic query

I don't understand why this is not working (my production query is much more complicated):

select *, rownum from (
select 1 from dual);

I am getting ORA-00923: FROM keyword not found where expected error.

What is wrong with this query?

Upvotes: 0

Views: 119

Answers (1)

Justin Cave
Justin Cave

Reputation: 231661

You'd need an alias on your inline view and on the * in your select list

select a.*, rownum 
  from (select 1 from dual) a;

Upvotes: 3

Related Questions