悉野小楼

导航

2011年10月12日

数据库随机取几条记录

摘要: Access:select top n * from table order by rnd(id)‘id为数据库的自动编号字段 Sql Server:select top n * from table order by newid()MySQL:SELECT * FROM tableorder byrand() limit 20;Oracle:select * from table order by dbms_random.value() 阅读全文

posted @ 2011-10-12 10:22 悉野 阅读(155) 评论(0) 推荐(0) 编辑