DELETE (SQL Statement)

Description

Removes rows from a table.

 

Syntax

DELETE { table_name  | view_name }
[ FROM { table_name  | view_name } [ ,n ] ]
[ WHERE < search_condition > ]

 

Example

DELETE table1
WHERE table1.c1 > 10

Detail

DELETE permissions default to members of the sysadmin fixed server role, the db_owner and db_datawriter fixed database roles, and the table owner. Members of the sysadmindb_owner, and the db_securityadmin roles, and the table owner can transfer permissions to other users.

SELECT permissions are also required if the statement contains a WHERE clause.