O'Reilly logo

Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started by Charlie Arehart, Raymond Camden, Ben Forta

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 Data

Deleting data from a table is even easier than adding or updating data—perhaps too easy.

You use the SQL DELETE statement to delete data. The statement takes only two parameters—one required and one optional:

  • The name of the table from which to delete the data must be specified immediately following the words DELETE FROM.

  • An optional WHERE clause can be used to restrict the scope of the deletion process.

The DELETE statement is dangerously easy to use. Look at the following line of code (but don’t execute it):

DELETE FROM Directors

This statement removes all directors from the Directors table, and does it without any warnings or confirmation.

Tip

Some databases, in particular client/server databases (such as Microsoft SQL Server ...

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