HASH BY Clause
Syntax Element … |
Specifies … |
HASH BY column_name |
Hashes rows across the AMPs in preparation to be input to a table function. HASH BY is a Teradata extension to the ANSI SQL:2011 standard. You can only specify a HASH BY clause for a statement whose result is to be input to a table function. HASH BY must be specified as part of a FROM clause. See “FROM Clause” on page 80. The scope of input to the HASH BY clause is limited to: You cannot specify a HASH BY clause with a derived table, view, or WITH clause object that specifies set operations. You cannot specify more than one HASH BY clause per statement. You can specify a HASH BY clause by itself or with a LOCAL ORDER BY clause. If you specify both, the HASH BY clause must precede the LOCAL ORDER BY clause. When you use a multiple input table operator that has multiple hash by clauses, the following restrictions apply: If you specify a LOCAL ORDER BY clause with HASH BY input, the following is required: |