Data Modification

Up to now, we have discussed basic SELECT statements. The SELECT statement allows you to retrieve data from your database tables and assumes that data has been previously loaded into the tables. Now we will concentrate on getting data into the database tables using SQL. There are three main statements that can be used to add and change data stored in a DB2 database table. They are the INSERT, DELETE, and UPDATE SQL statements.

To perform these operations, you must have the required privileges on the tables being accessed. Usually, these privileges are more strictly enforced since they can allow the end-user to modify data records.

Inserting Data Records

To initially populate a DB2 table with data, the INSERT statement can be ...

Get DB2® Universal Database for OS/390® Version 7.1 Certification Guide 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.