Trabla: Postgresql: random function in query
Solving:
SELECT random();
Result:
random
double precision
0.749302998185158
Example:
Get random int from 0 to 100
SELECT (random()*100)::int ;
Result:
int4
integer
24
Official Docs:
http://www.postgresql.org/docs/8.2/static/functions-math.html
No comments:
Post a Comment