Restrictions - Analytics Database - Teradata Vantage

SQL Functions, Expressions, and Predicates

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
obm1628111499646.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
kby1472250656485
lifecycle
latest
Product Category
Teradata Vantageā„¢
The following rules and restrictions apply to the use of the RANDOM function.
  • RANDOM can only be called in one of the following SELECT query clauses:
    • WHERE
    • GROUP BY
    • ORDER BY
    • HAVING/QUALIFY
  • RANDOM cannot be referenced by position in a GROUP BY or ORDER BY clause.
  • RANDOM cannot be nested inside aggregate or ordered analytical functions.
  • RANDOM cannot be used in the expression list of an INSERT statement to create a primary index or partitioning column value.

    For example:

    INSERT t1 (RANDOM(1,10),...) 

    RANDOM causes an error to be reported in this case if the first column in the table is a primary index or partitioning column.