Teradata RANDOM Number

Raymond Tang Raymond Tang 0 1637 0.94 index 9/20/2020

RANDOM function in Teradata returns a random integer number for each row of the results table. It is a Teradata extension to the ANSI SQL:2011 standard.

Function syntax

Random(lower_bound, upper_bound)

The limits forĀ lower_boundand upper_boundrange from -2147483648 to 2147483647 inclusively and upper_boundmust be greater or equal to lower_bound.

Example

SELECT RANDOM(1,1000);

The output will be a random number between 1 and 1000.

sql teradata

Join the Discussion

View or add your thoughts below

Comments