Logical Connectors
Overview
The AND and OR keywords are used to connect one logical expression to another. They support infinite nesting of parenthesis and all expressions are calculated using standard mathematical order of operations.
Example
Statement to select documents from the Word schema where the text is either 'Cat' or 'Dog'.
SELECT * FROM WordList:Word
WHERE Text = 'Cat' OR Text = 'Dog'
Statement to select documents from the Word schema where the text is 'Cat' and the LanguageId is wither 3 or 5.
SELECT * FROM WordList:Word
WHERE Text LIKE 'Cat%' AND (LanguageId = 3 OR LanguageId = 5)
Related
- Keywords - A breakdown of all high-level statements available via the query handler.