讀取隨機記錄的例子 SQL語句

  幫朋友改個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字段名