w3resource

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

pictorial presentation of PostgreSQL RANDOM() function

Example: PostgreSQL RANDOM() function

Code:

SELECT RANDOM() AS "Random Numbers";

Sample Output:

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

Previous: RADIANS function
Next: ROUND function



Share this Tutorial / Exercise on : Facebook and Twitter