0

I want to update rand number Resolve this my problem

update abc set postion=rand() where status = 1

Anybody can help

pankaj
  • 1

1 Answers1

1

for random no in float type

SELECT name, FLOOR( RAND( ) * (SELECT COUNT(*) FROM users)) + RAND() AS rand_no FROM users

for random no in integer type

SELECT name, FLOOR( RAND( ) * (SELECT COUNT(*) FROM users)) + 100 AS rand_no FROM users

Yasir Mehmood
  • 296
  • 2
  • 11