SQL DELETE: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 5: Line 5:


<syntaxhighlight lang='sql'>
<syntaxhighlight lang='sql'>
DELETE FROM person ...
DELETE FROM person WHERE id = 8;
</syntaxhighlight>
</syntaxhighlight>
:{| class="wikitable" style="text-align: left;"
:{| class="wikitable" style="text-align: left;"
Line 13: Line 13:
|}
|}
The <code>DELETE</code> statement may contain a <code>WHERE</code> clause, that identifies the rows to be deleted: {{Internal|SQL_WHERE#Overview|The <tt>WHERE</tt> Clause}}
The <code>DELETE</code> statement may contain a <code>WHERE</code> clause, that identifies the rows to be deleted: {{Internal|SQL_WHERE#Overview|The <tt>WHERE</tt> Clause}}
=Conditional <tt>DELETE</tt>=
Also see: {{Internal|SQL_Conditional_Logic#Overview|SQL Conditional Logic}}

Latest revision as of 21:11, 30 May 2024

Internal

Overview

DELETE FROM person WHERE id = 8;
PostgreSQL MySQL

The DELETE statement may contain a WHERE clause, that identifies the rows to be deleted:

The WHERE Clause

Conditional DELETE

Also see:

SQL Conditional Logic