SQL WHERE: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 6: Line 6:
=Overview=
=Overview=
The <code>WHERE</code> clause is the mechanism for filtering out unwanted data from the [[SQL#Result_Set|result set]]. The <code>WHERE</code> clause can be used with <code>[[SQL_SELECT#WHERE|SELECT]]</code>, <code>[[SQL_UPDATE#Overview|UPDATE]]</code> and <code>[[SQL_DELETE#Overview|DELETE]]</code>, but not with <code>[[SQL_INSERT#Overview|INSERT]]</code>.
The <code>WHERE</code> clause is the mechanism for filtering out unwanted data from the [[SQL#Result_Set|result set]]. The <code>WHERE</code> clause can be used with <code>[[SQL_SELECT#WHERE|SELECT]]</code>, <code>[[SQL_UPDATE#Overview|UPDATE]]</code> and <code>[[SQL_DELETE#Overview|DELETE]]</code>, but not with <code>[[SQL_INSERT#Overview|INSERT]]</code>.
<syntaxhighlight lang='sql'>
SELECT * FROM person WHERE person.name = 'Alice';
</syntaxhighlight>


Filters, conditions, condition evaluation.
Filters, conditions, condition evaluation.

Revision as of 21:50, 23 May 2024

Internal

Overview

The WHERE clause is the mechanism for filtering out unwanted data from the result set. The WHERE clause can be used with SELECT, UPDATE and DELETE, but not with INSERT.

SELECT * FROM person WHERE person.name = 'Alice';

Filters, conditions, condition evaluation.

Filters

Conditions