| 订阅 | 在线投稿
分享
 
 
 

读取随机记录的例子 SQL语句

2008-12-13 08:23:50 编辑來源:互联网 国际版 评论
 
 
本文为【读取随机记录的例子 SQL语句】的汉字拼音对照版显示拼音
  bangpengyougaigeaspdexiangguanchanpinxianshiyaoyongdaosuijiduqudangqianleibiedeqian10gechanpinGooglelexiashoucangde

  mysqlzhongsuijitiqushujukujilu

  -------------------------------------------------------------------------------- view plaincopy to clipboardprint?

  select * from tablename order by rand() limit 10

  select * from tablename order by rand() limit 10sqlserverzhongsuijitiqushujukujilu

  -------------------------------------------------------------------------------- view plaincopy to clipboardprint?

  select top 10 * from tablename order by NEWID()

  select top 10 * from tablename order by NEWID()Accesszhongsuijitiqushujukujilu

  -------------------------------------------------------------------------------- view plaincopy to clipboardprint?

  SELECT top 10 * FROM tablename ORDER BY Rnd(FId)

  SELECT top 10 * FROM tablename ORDER BY Rnd(FId)FId:weinidangqianbiaodeIDziduanming原文
 
 
帮朋友改个asp的相关产品显示要用到随机读取当前类别的前10个产品,Google了下收藏的 mysql中随机提取数据库记录 -------------------------------------------------------------------------------- view plaincopy to clipboardprint? select * from tablename order by rand() limit 10 select * from tablename order by rand() limit 10sqlserver中随机提取数据库记录 -------------------------------------------------------------------------------- view plaincopy to clipboardprint? select top 10 * from tablename order by NEWID() select top 10 * from tablename order by NEWID()Access中随机提取数据库记录 -------------------------------------------------------------------------------- view plaincopy to clipboardprint? SELECT top 10 * FROM tablename ORDER BY Rnd(FId) SELECT top 10 * FROM tablename ORDER BY Rnd(FId)FId:为你当前表的ID字段名
󰈣󰈤
 
 
>>返回首页<<
 为你推荐
 
 
 
 转载本文
 UBB代码 HTML代码
复制到剪贴板...
 
 
 热帖排行
 
 
王朝网络微信公众号
微信扫码关注本站公众号wangchaonetcn
 
  免责声明:本文仅代表作者个人观点,与王朝网络无关。王朝网络登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
©2005- 王朝网络 版权所有