Postgresql
select serialno, random() as r from mt_t_serialno_test order by r
limit (select count(1)/4 from mt_t_serialno_test )
将数据库中数据随机排序,并选择前25%数据。
select serialno, random() as r from mt_t_serialno_test order by r
limit (select count(1)/4 from mt_t_serialno_test )
将数据库中数据随机排序,并选择前25%数据。