SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table test ( "id" serial, "hash" varchar(64), "on" boolean ); insert into test values (1, 'aaa', true), (2, 'aaa', true), (3, 'bbb', true), (4, 'aaa', false), (5, 'ccc', true) ; select * from test; select * from test join ( select "hash" from test where "on" order by random() limit 1 ) t on t.hash = test.hash;
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear