PostgreSQL数据库-抽奖sql
摘要:
select * from users order by random();--会进行随机排序,每次运行都会返回不同的结果 select * from users order by random() limit 1;--会进行随机排序,每次运行都会返回一条记录,用来模拟抽奖 阅读全文
posted @ 2020-02-27 22:33 ~码铃薯~ 阅读(272) 评论(0) 推荐(0) 编辑
posted @ 2020-02-27 22:33 ~码铃薯~ 阅读(272) 评论(0) 推荐(0) 编辑
posted @ 2020-02-27 21:00 ~码铃薯~ 阅读(2478) 评论(0) 推荐(0) 编辑
posted @ 2020-02-27 17:58 ~码铃薯~ 阅读(296) 评论(0) 推荐(0) 编辑
posted @ 2020-02-27 10:15 ~码铃薯~ 阅读(200) 评论(0) 推荐(0) 编辑