Oracle Mysql SqlServer檢視錶的最後10行

Michael_DD發表於2015-01-15
Oracle Mysql SqlServer檢視錶的最後10行



Oracle:

select * from (select * from temp order by rownum desc) where rownum <=10




Mysql:

select * from temp order by c1 desc limit 10;




SqlServer:

SELECT TOP 1 * FROM temp ORDER BY c1 DESC;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29500582/viewspace-1403079/,如需轉載,請註明出處,否則將追究法律責任。

相關文章