NexusDB Manual V3 > SQL Reference > SQL Statements > Data Statements
Delete rows of a table.
Syntax
<delete statement: searched> ::=
Usage
The DELETE statement is used to delete a selection of rows from the table identified by table-name.
Notes
Tip: A more efficient way of deleting all the rows in a table is to drop the table and then recreate it.
1) The following example deletes students who are not enrolled in any courses:
DELETE FROM students WHERE studentID IN ( SELECT DISTINCT studentID FROM students s LEFT JOIN enrolls e ON e.studentID = s.studentID WHERE e.studentID IS NULL )
DELETE FROM students WHERE studentID = :studentID
DELETE FROM ##students
Conformance
|
© Nexus Database Systems Pty Ltd.