Lesson 4 | Overview of deleting data |
Objective | Describe how to delete data with Transact-SQL. |
Deleting Data using SQL-Server
To delete data in a table, you use the DELETE
Transact-SQL statement. In contrast to the UPDATE
statement, you do not specify column names in the DELETE
statement. This is because the DELETE
statement only allows you to delete an entire row of data.
While you can not limit your DELETE
statement to specific columns, you can use the WHERE
clause to narrow your deletion to specific rows. If you do not use the WHERE
clause, all of the rows in your selected table will be removed. The DELETE
statement uses the following general syntax: