各個(gè)數(shù)據(jù)庫(kù)中TOP10記錄的查詢方法 |
發(fā)布時(shí)間: 2012/8/9 17:09:15 |
各個(gè)數(shù)據(jù)庫(kù)中TOP10記錄的查詢方法 Oracle數(shù)據(jù)庫(kù): select * from (select * from tab order by id desc) where rownum < 11; MySQL數(shù)據(jù)庫(kù): select * from tab order by id desc limit 0, 10; - 如,例子就是從第一行開(kāi)始,一共查詢10行。) MSSQL與Access數(shù)據(jù)庫(kù) select top 10 * from tab order by id desc (這個(gè)大概是最常用的了, ^.^) 本文出自:億恩科技【1tcdy.com】 服務(wù)器租用/服務(wù)器托管中國(guó)五強(qiáng)!虛擬主機(jī)域名注冊(cè)頂級(jí)提供商!15年品質(zhì)保障!--億恩科技[ENKJ.COM] |