O'Reilly logo

Microsoft® SQL Server™ 2005: Database Essentials Step by Step by Solid Quality Learning

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 11. Deleting Data from Microsoft SQL Server 2005

After completing this chapter, you will be able to:

  • Delete information from your database

  • Manage deletions and control row deletions

  • Delete data using ADO.NET

Using the DELETE Statement

There will be occasions when you need to delete some or all of the information in your database. You may need to remove a record inserted by error, or you may decide to delete information physically from a table when the user wants to delete some records. Alternatively, you may need to remove old information from an historical table. In all of these cases, you will use the DELETE statement.

The basic DELETE sentence is:

DELETE FROM [<ServerName>.][<DataBseName>.]<SchemaName>.<TableName>
      WHERE <Conditions>

If you ...

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