开发者

Oracle SQL Syntax: Select

开发者 https://www.devze.com 2023-03-12 03:52 出处:网络
Are the following sql statement valid in Oracle SQL? 1) select 1 2) select test from (select开发者_StackOverflow社区 1 as test)

Are the following sql statement valid in Oracle SQL?

1)

select 1

2)

select test from (select开发者_StackOverflow社区 1 as test)

3)

select test from (select 1 as test) s

Thanks in advance!

Best, Will


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
0

精彩评论

暂无评论...
验证码 换一张
取 消