467,199 Members | 1,038 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,199 developers. It's quick & easy.

Does DB2 support inline views?

Does DB2 support inline views, or subqueries in the FROM clause? If so
what is the syntax?
Nov 12 '05 #1
  • viewed: 6639
Share:
1 Reply
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.

Similar topics

4 posts views Thread by ketulp_baroda@yahoo.com | last post: by
2 posts views Thread by David Nettles | last post: by
reply views Thread by Pavel | last post: by
13 posts views Thread by Paul | last post: by
38 posts views Thread by Martin Marcher | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.