随机获取一条数据,使用random()函数,也可以加筛选条件:
select id from table where status = 0 order by random() limit 1 ;
postgresql随机查询一条数据
阅读 144
2022-04-23
随机获取一条数据,使用random()函数,也可以加筛选条件:
select id from table where status = 0 order by random() limit 1 ;
相关推荐
精彩评论(0)