Collection Contents Index CHAPTER 8.  Adding, Changing, and Deleting Data Adding data using INSERT pdf/chap8.pdf

User's Guide
   PART 1. Working with Databases
     CHAPTER 8. Adding, Changing, and Deleting Data       

Data modification statements


The statements you use to add, change, or delete data are called data modification statements. The most common such statements are as follows:

Any single INSERT, UPDATE, or DELETE statement changes the data in only one table or view.

In addition to the common statements, the LOAD TABLE and TRUNCATE TABLE statements are designed especially for bulk loading and deleting of data.

Sometimes, the data modification statements are collectively called the data modificaton language (DML) part of SQL.

Top of page  Permissions for data modification

You can only execute data modification statements if you have the proper permissions on the database tables you are modifying. The database administrator and the owners of database objects use the GRANT and REVOKE statements to decide who has access to which data modification functions.

For Info     Permissions can be granted to individual users, groups, or the public group. For more information on permissions, see Managing User IDs and Permissions.

Top of page  Transactions and data modification

When data is modified, a copy of the old and new state of each row affected by each data modification statement is written to the transaction log. This means that if you begin a transaction, realize you have made a mistake, and roll the transaction back, the database can be restored to its previous condition.

For Info     For more information about transactions, see Using Transactions and Locks.

Top of page  

Collection Contents Index CHAPTER 8.  Adding, Changing, and Deleting Data Adding data using INSERT pdf/chap8.pdf