O'Reilly logo

SQL: Visual QuickStart Guide, Third Edition by Chris Fehily

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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:

  • The INSERT statement adds new rows to a table.

  • The UPDATE statement changes the values in a table’s existing rows.

  • The DELETE statement 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 table;.

Unlike SELECT, which only accesses data, these statements change data, so your ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required