文章搜索: 分类 关键字

   您的位置:首页数据库MySql → 从数据库中随机抽N条记录
从数据库中随机抽N条记录
日期:2007-3-17 20:25:22 人气:     [ ]

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

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

转自:动态网制作指南 www.knowsky.com
出处:CnCode转载收集 作者:不详
<---->
 
| 关于本站 | 帮助(?) | 广告服务 | 版权声明 | 业务合作 | 发展历程 | 加盟我们 | 联系我们 | 中国源码中心 ≮为您提供建站帮助≯

  中国源码中心 版权所有 Copyright© 2002-2006 Www.CnCode.Com, All Rights Reserved. Powered By 中国源码中心