tags:

views:

30

answers:

2

Can I use DML in from clause in DB2? thank you

A: 

Why would you do that? I don't think I've ever seen that in an SQL statement...

drachenstern
A: 

The DB2 V9 SQL Reference states that the FROM clause can only contain a table-reference:

     .-,---------------.   
     V                 |   
>>-FROM----table-reference-+-----------------------------------><

The description of "table-reference" is directly below that, so it will tell you exactly what is allowed and what is not allowed. A table-reference can include "Data change table references," one of which is "NEW TABLE." Maybe that's what you're after, but as other people have already said, without knowing what you're trying to do, it's hard to answer the question.

SQL Syntax diagram for table-reference (scroll about 1/4 down the page)

Michael Sharek