Chapter 6: Data Manipulation Language (DML)

Chapter 6: Data Manipulation Language (DML)


Chapters 4 and 5 discussed an important part of SQL called the data definition language (DDL) that enables you to create, alter, and destroy various database objects. We emphasized the fact that tables are the most important database objects because they store data, and data is what databases are all about. This chapter deals with the data manipulation language (DML) that allows you to add data to the database, modify it as necessary, and destroy it when it is no longer needed.

"Classical" DML consists of three statements: INSERT, UPDATE, and DELETE. Oracle 9i introduces yet another DML statement, MERGE, that combines the functionality of INSERT and UPDATE.


Examples in this chapter assume incremental buildup of the ACME database started in Chapter 4 and Chapter 5. Constraints implemented in the database scripts included with the CD-ROM may prevent some of the statements from successful execution.