Brought to you by molecularsciences.org.
This work is licensed under a Creative Commons Attribution-Share Alike 3.0 License.
This publication may not be redistributed without this notice.

DB2 Quick Guide

SQL Commands

Comments

/* */
--

Select

select co1, co2 from tbl where fld = 3;

Insert (values)

insert into tbl (co1, co2) values (1, 'one');
insert into tbl (co1, co2)
values ((select id from tbl2 where something = 'something'), 'one');

Delete

delete from tbl where co1 = 1;