2011-06-09 86 views
1

以下SQL語句在Oracle SQL中是否有效?Oracle SQL語法:請選擇

1)

select 1 

2)

select test from (select 1 as test) 

3)

select test from (select 1 as test) s 

提前感謝!

最佳, 威爾

回答

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