开发者

Are sub-SELECT's in SELECT and FROM clauses standard-compliant?

开发者 https://www.devze.com 2023-02-21 19:24 出处:网络
The title pretty much says it all.Under \"standard-compliant\" SQL I mean SQL constructs allowed in any of SQL 开发者_如何学Pythonstandards.

The title pretty much says it all. Under "standard-compliant" SQL I mean SQL constructs allowed in any of SQL 开发者_如何学Pythonstandards.

I looked through the "Understanding SQL" book, but it mentions subqueries only inside WHERE, GROUP BY, HAVING etc. clauses, not SELECT and FROM (or maybe I'm missing something).

I know MS SQL allows sub-SELECT's in SELECT and FROM. I would like to know if it is a standard behavior. Or maybe it isn't standard, but is now implemented in major SQL databases (I have very little experience with DB's other than MS SQL)?


Yes. You can use a subquery as a derived table wherever you can use a table in a select statement.

SQL ANSI 92

0

精彩评论

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