以下sql语句在Oracle SQL中是否有效?
1)
select 1
2)
select test from (select 1 as test)
3)
select test from (select 1 as test) s
提前致谢!
最佳, 将
答案 0 :(得分:6)
它们都不是有效的。这些是正确的陈述:
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