Subquery Options - 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

Subquery Options

 

Syntax Element …

Specifies …

column_name

the name of a column for which the insert operation supplies a new row value.

column_name can be specified in any order.

If a column_name is omitted, then any default value defined in the CREATE TABLE or CREATE VIEW request is used.

You cannot specify a derived period column name.

The begin and the end columns of a derived period column can be independently updated. The end column value must be greater than the begin column value of the derived period column.

subquery

that the row or rows to be inserted consist of column values accessed by a query specification.

If a column name list is not specified, then the SELECT request must query the same number of columns as there are in the table that is receiving new rows.

You can specify nulls in the select expression list for columns that are not to be assigned values.

You cannot specify an ORDER BY clause as part of a subquery in an INSERT … SELECT request.

If the INSERT operation includes a column name list, values are assigned by matching column_name position with position of items in the select expression list.

HASH BY hash_list

HASH BY RANDOM

to hash rows being inserted into a NoPI table across the AMPs either based on the hash_list or randomly, a block at a time.

LOCAL ORDER BY order_list

to order rows being inserted into a table locally on the AMPs.