SQL WHERE: Difference between revisions
Jump to navigation
Jump to search
Line 3: | Line 3: | ||
* [[SQL_UPDATE|SQL <tt>UPDATE</tt>]] | * [[SQL_UPDATE|SQL <tt>UPDATE</tt>]] | ||
* [[SQL_DELETE|SQL <tt>DELETE</tt>]] | * [[SQL_DELETE|SQL <tt>DELETE</tt>]] | ||
=TODO= | |||
<font color=darkkhaki>TO PROCESS: https://learning.oreilly.com/library/view/learning-sql-3rd/9781492057604/ch04.html</font> | |||
=Overview= | =Overview= |
Revision as of 01:59, 24 May 2024
Internal
TODO
TO PROCESS: https://learning.oreilly.com/library/view/learning-sql-3rd/9781492057604/ch04.html
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
. The WHERE
clause may contain an arbitrary number of filter conditions separated by AND
, OR
and NOT
operators, and optionally grouped together with parentheses.
FROM <filter_condition> AND|OR <filter_condition> ...
SELECT * FROM person WHERE person.name = 'Alice' AND (person.eye_color = 'blue' OR person.eye_color = 'black');
Filter Conditions
NULL in Conditions
Also see: