0
点赞
收藏
分享

微信扫一扫

postgresql随机查询一条数据

科牛 2022-04-23 阅读 144
postgresql

随机获取一条数据,使用random()函数,也可以加筛选条件:

select id from table where status = 0 order by random() limit 1 ;

举报

相关推荐

0 条评论