Posted on Tuesday, 27th January 2009 by Balazs
In DB2 if you need to populate a table, you need to use INSERT INTO, like in this example:
INSERT INTO new_table
SELECT col1,col2 FROM source_table
WHERE col1=’something’;
and if you need to populate query variable, you need to use SELECT INTO, like in this example:
SELECT * INTO :var1, :var2, :var3FROM table_name
WHERE col1= ’something’;
Source: DB2 Documentation
Tags: DB2, IBM, insert, insert into, into, select, select into, SQL
Posted in DB2 | Comments (Comments)