从数据库中随机抽N条记录

发表于:2007-06-21来源:作者:点击数: 标签:

   

Access:
select top n * from table order by rnd(id)'id为数据库的自动编号字段

Sql Server:
select top n * from table order by newid()

原文转自:http://www.ltesting.net