标签: sqlite
仅在表的行数= 245时,才能在SQLite中使用“按随机数排序”?
我需要使用此SELECT * FROM generic table ORDER BY RANDOM();
SELECT * FROM generic table ORDER BY RANDOM();
答案 0 :(得分:0)
一种方法:
select * from generictable order by case when ((select count(*) from generictable) = 245) then random() else 1 end