Link to home
Create AccountLog in
Avatar of hankknight
hankknightFlag for Canada

asked on

MySQL: Randomly Return 1 or -1

This randomly returns 1 or 0.

SELECT FLOOR(RAND()*2) 

Open in new window

I want it to randomly select 1 or -1
ASKER CERTIFIED SOLUTION
Avatar of Robert Schutt
Robert Schutt
Flag of Netherlands image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account