Search condition
boolean combination of predicates with AND, OR, NOT
What changes
- Input
- columns, variables, subqueries
- Output or change
- TRUE, FALSE or UNKNOWN
Syntax at a glance
<search_condition> ::= MATCH (<graph_search_pattern>) | <search_condition_without_match> | <search_condition> AND <search_condition>
Work example
A report needs Search condition to define which rows satisfy a compound search condition.
Test a match, a nonmatch, and NULL. Write the expected TRUE, FALSE, or UNKNOWN result before running the filter.
Check your work Search condition. The rows kept by Search condition are exactly those whose complete condition evaluates to TRUE.
Practice SQL
Open in SQL FlowSELECT Value
FROM (VALUES (1), (2), (NULL)) AS Items(Value)
WHERE Value IS NULL OR Value > 1;
Open Microsoft Learn for full syntax, permissions, and details for your version.