各個數(shù)據(jù)庫中TOP10記錄的查詢方法 |
發(fā)布時間: 2012/8/9 17:09:15 |
各個數(shù)據(jù)庫中TOP10記錄的查詢方法 Oracle數(shù)據(jù)庫: select * from (select * from tab order by id desc) where rownum < 11; MySQL數(shù)據(jù)庫: select * from tab order by id desc limit 0, 10; - 如,例子就是從第一行開始,一共查詢10行。) MSSQL與Access數(shù)據(jù)庫 select top 10 * from tab order by id desc (這個大概是最常用的了, ^.^) 本文出自:億恩科技【www.laynepeng.cn】 |