HAVING Clause - Teradata Database

SQL Data Manipulation Language

Product
Teradata Database
Release Number
15.10
Language
English (United States)
Last Update
2018-10-06
dita:id
B035-1146
lifecycle
previous
Product Category
Teradata® Database

Specifies a conditional expression that must be satisfied for a group of rows to be included in the result data.

where:

 

Syntax Element …

Specifies …

HAVING

an introduction to the conditional clause in the SELECT statement.

search_condition

one or more conditional expressions that must be satisfied by the result rows. You can specify aggregate operators, scalar subqueries, and DEFAULT functions as conditional expressions with HAVING.

HAVING search_condition selects rows from a single group defined in the SELECT expression list that has only aggregate results, or it selects rows from the group or groups defined in a GROUP BY clause.

The HAVING search condition cannot reference BLOB, CLOB, ARRAY, or VARRAY columns.

If you specify the value for a row‑level security constraint in a search condition, that value must be expressed in its encoded form.

The HAVING clause is ANSI SQL:2011-compliant.