Logical Connectors

Table of Contents

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
round-pushpin 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'

round-pushpin 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