Product Documentation

SQL Reference Guide

Previous Topic

Next Topic

RAND function (ODBC compatible)

Syntax

RAND ( [ expression ] )

Description

The scalar function RAND returns a randomly-generated number, using expression as an optional seed value.

Example

SELECT RAND(3) 'Random number using 3 as seed value'

FROM ADMIN.SYSCALCTABLE;

Notes

  • Expression must evaluate to an exact numeric data type.

TOCIndex