Hi! Could we please enable some services and cookies to improve your experience and our website?

SQLize | PHPize | SQLtest

Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code

A A A
Login    Share code      Blog   FAQ
Copy Format Clear
create table records(id int, name varchar(100), position int); insert into records(id, name, position) values (1, '111', 1), (2, '111', 2), (3, '111', 3), (4, '111', 4), (5, '111', 5), (6, '111', 6), (7, '111', 7), (8, '111', 8), (9, '111', 10), (10, '111', 11), (11, '111', 12), (11, '111', 100); update records set position = (select floor(rand()*(max(position) - min(position))+min(position)) from (select * from records) as t); select * from records;

Stuck with a problem? Got Error? Ask AI support!

Copy Clear