ITPub博客

首页 > 数据库 > 数据库开发技术 > 各数据库取前x行

各数据库取前x行

原创 数据库开发技术 作者:miguelmin 时间:2009-02-16 13:07:54 0 删除 编辑

Oracle
select * from table where rownum < x;

db2
select * from table fetch first x rows only;

teradata
select top x * from table;

sql server
select top x * from table;

[@more@]

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16723161/viewspace-1017422/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: spool空间
请登录后发表评论 登录
全部评论
  • 博文量
    138
  • 访问量
    1628717