WHERE Clause Syntax | Teradata Vantage - WHERE Clause Syntax - Analytics Database - Teradata Vantage

SQL Data Manipulation Language

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-04-05
dita:mapPath
pon1628111750298.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
esx1472246586715
lifecycle
latest
Product Category
Teradata Vantage™
WHERE search_condition

Syntax Elements

search_condition
A conditional search expression, also referred to as a conditional expression or predicate, that must be satisfied by the row or rows returned by the statement.
The arguments can be any valid SQL expression, including individual values, user-defined functions, DEFAULT functions, and subqueries, but the overall expression must be of a form that returns a single boolean (TRUE or FALSE) result.
Logical expressions include comparisons of numeric values, character strings, and partial string comparisons.
You cannot specify an expression that returns an ARRAY or VARRAY data type in a WHERE clause search condition. For more information about relational operators and expressions, see Teradata Vantage™ - Data Types and Literals, B035-1143.
Scalar subqueries are valid search conditions.
You cannot specify expressions that contain LOBs in a search condition unless you first cast them to another data type (for example, casting a BLOB to BYTE or VARBYTE or a CLOB to CHARACTER or VARCHAR) or pass them to a function whose result is not a LOB.
Subqueries in a search condition cannot specify SELECT AND CONSUME.
You can only specify a scalar UDF for search_condition if it is invoked within an expression and returns a value expression.
If you specify the value for a row-level security constraint in a search condition, it must be expressed in its encoded form.