Modifying data

In addition to using the SELECT statement for retrieving data, you can use SQL statements to add, modify, and remove data in existing tables. This section provides an overview of how to use the INSERT, UPDATE, and DELETE statements to manipulate DB2 data.

If you insert, update, or delete data, you can retrieve the data immediately. If you open a cursor and then modify data, you see the modified data only in some circumstances.

Any modifications must maintain the integrity of table relationships. DB2 ensures that an insert, update, or delete operation does not violate any referential constraint or check constraint that is defined ...

Get Official Introduction to DB2® for z/OS®, The, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.