Here is what i have tried so far but some times its returning 3 digit or 2 digit or even 1 digit number.
SELECT num
FROM GENERATE_SERIES (1, 10000) AS s(num)
order by random()
LIMIT 1
You can use this expression to avoid dealing with sub-queries
select floor(1000 + random() * 8999);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With