O'Reilly logo

SQL: Visual QuickStart Guide 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

Deleting Rows with DELETE

The DELETE statement removes rows from a table. You can use DELETE to remove:

  • All rows in a table

  • Specific rows in a table

To delete rows, you specify:

  • The table whose rows to delete

  • An optional search condition that specifies which rows to delete

The important characteristics of DELETE are:

  • Unlike INSERT and UPDATE, DELETE takes no column names because it removes entire rows.

  • DELETE removes rows from a table, but it never deletes the table’s definition. Even if you remove all rows from a table, the table itself still exists. If you want to delete a table definition (and all its associated data, indexes, and so on), see “Dropping a Table with DROP TABLE” in Chapter 10.

  • DELETE takes an optional WHERE clause that specifies ...

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