SQL WHERE: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 16: Line 16:
</font>
</font>


=Filters=
=Filter Conditions=
 
=Conditions=
==<tt>NULL</tt> in Conditions==
==<tt>NULL</tt> in Conditions==
Also see: {{Internal|SQL#SQL_NULL|<tt>NULL</tt>}}
Also see: {{Internal|SQL#SQL_NULL|<tt>NULL</tt>}}

Revision as of 22:04, 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';

The WHERE clause may contain an arbitrary number of filter conditions separated by AND, OR and NOT operators, and optimally grouped together with parentheses.

  FROM <filter_condition> AND|OR <filter_condition> ...

Filter Conditions

NULL in Conditions

Also see:

NULL