ITPub博客

首页 > 数据库 > 数据库开发技术 > Oracle Mysql SqlServer查看表的最后10行

Oracle Mysql SqlServer查看表的最后10行

原创 数据库开发技术 作者:Michael_DD 时间:2015-01-15 16:31:19 0 删除 编辑
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博客 ” ,链接:https://blog.itpub.net/29500582/viewspace-1403079/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: Oracle 表碎片
请登录后发表评论 登录
全部评论

注册时间:2014-02-22

  • 博文量
    326
  • 访问量
    2671970