Chapter 10. Inserting, Updating, and Deleting Rows
To this point, I’ve explained how to use
SELECT to retrieve and analyze the data in tables. In this chapter, I’ll explain how to use SQL statements to modify table data:
INSERTstatement adds new rows to a table.
UPDATEstatement changes the values in a table’s existing rows.
DELETEstatement removes rows from a table.
These statements don’t return a result, but your DBMS normally will print a message indicating whether the statement ran successfully and, if so, the number of rows affected by the change. To see the actual effect the statement had on a table, use a
SELECT statement such as
SELECT * FROM
SELECT, which only accesses data, these statements change data, so your ...