11.2.1 DELETE Syntax
The DELETE statement is used to delete data from the table, and its syntax is:
The parameters are described as follows:
From
This parameter is an optional option for connecting the DELETE keyword and the name of the object to delete the data. table_name
Specifies the table to delete data from. With ([... n])
Specifies the table hints allowed for one or more destination tables. View_name
Specifies the view used to delete data. rowset_function_limited
Rowset function restriction, that is, using the OPENQUERY () or OPENROWSET () function. From
Specifies an additional FROM clause. This is an extension of the DELETE command in a Transact-SQL language that allows the deletion of data from multiple tables at the same time. The parameters include Join_table, Join_type, and so on, which are consistent with the FROM clause in Chapter 10th "Data Query". WHERE
Specify criteria for restricting data deletion. If you do not specify a WHERE clause, all data in the table is deleted. Specify two forms of delete operations in the WHERE clause. One is to search for deletion, in addition to using search criteria to qualify data rows to be deleted: the other is to locate the deletion by specifying a cursor using the current OF clause, which will be generated at the present position of the cursor. Locating deletes is more accurate than searching for deletions. GLOBAL
Indicates that the cursor to use is a global cursor. If you do not use this option, and if there is a case with the same name as a global cursor and a local cursor, the system considers the selected cursor to be a local cursor. Cursor_name