PostgreSQL RANDOM Function

Education is not limited to just classrooms. It can be gained anytime, anywhere... - Ravi Ranjan (M.Tech-NIT)

PostgreSQL RANDOM() function

RANDOM() function

The PostgreSQL random() function is used to return the random value between 0 and 1.

Syntax :

random()

PostgreSQL Version : 9.3

Pictorial presentation of PostgreSQL RANDOM() function

 

Example : PostgreSQL RANDOM() function

SELECT RANDOM() AS "Random Numbers";

Output :

     Random Numbers
-------------------
 0.070854683406651
(1 row)