By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,004 Members | 1,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,004 IT Pros & Developers. It's quick & easy.

Does DB2 support inline views?

P: n/a
Does DB2 support inline views, or subqueries in the FROM clause? If so
what is the syntax?
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
chris wrote:
Does DB2 support inline views, or subqueries in the FROM clause? If so
what is the syntax?

DB2 for LUW supports the SQL Standard syntax, of course.
A (silly) example would be:
SELECT (SELECT 1 FROM SYSIBM.SYSDUMMY1) AS X
FROM (SELECT 1 FROM SYSIBM.SYSDUMMY1) AS Y

DB2 for zOS used to have some limitations in the past but I think they
have been removed no later than DB2 V8 fro zOS.

Note that inline views in DB2 are often a synonym for
'common table expression' (the WITH clause)
A better name for what you are looking for are nested fullselect or
nested queries.

Cheers
Serge
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.