Reputation: 2978
Are the following sql statement valid in Oracle SQL?
1)
select 1
2)
select test from (select 1 as test)
3)
select test from (select 1 as test) s
Thanks in advance!
Best, Will
Upvotes: 1
Views: 351
Reputation: 220987
None of them are valid. These are the correct statements:
1)
select 1 from dual
2)
select test from (select 1 as test from dual)
3)
select test from (select 1 as test from dual) s
-- or also
select s.test from (select 1 as test from dual) s
Upvotes: 6