ODBC Server Reference Manual

Transact-SQL Language
HP NonStop ODBC Server Reference Manual429151-002
4-63
DELETE
DELETE
Use DELETE to remove rows from a table.
The DELETE statement has the following syntax:
FROM
is not supported. The NonStop ODBC Server ignores this clause.
table-name or view-name
identifies the table or view from which rows are to be deleted. The table-name or
view-name can be qualified with the database name and owner name.
You cannot delete rows from a view that references more than one table, even if
the rows being deleted belong to only one of the tables.
FROM table-reference
is not supported. In the NonStop ODBC Server, this clause generates an error
message. You cannot delete rows based on data stored in other tables.
WHERE search-condition
specifies the criteria for the rows to delete.
The search-condition cannot contain subqueries that refer to the table or view
from which the rows are being deleted.
If you omit the WHERE clause, all rows are deleted.
Examples
The following statements delete one record from the EMPLOYEE table and one from
the DEPARTMENT table:
delete employee
where last_name = "Hall" and first_name = "Dana"
delete department
where deptnum = 1030
DELETE [ FROM ] table-reference
[ FROM table-reference [ , table-reference ... ] ]
[ WHERE search-condition ]
table-reference is:
[ [database.]owner. ] {table-name }
{view-name) }