码迷,mamicode.com
首页 > 数据库 > 详细

top 命令SQLServer-sybase-oracle

时间:2014-09-03 23:53:27      阅读:328      评论:0      收藏:0      [点我收藏+]

标签:使用   c   sql   oracle   table   as   r   rom   server   

SQLServer:

select top 10 * from tablename;

select top 10 percent from tablename;

select * from tablename limit 10;

SYBASE:

select top 10 * from tablename;

ORACLE:

oracle中无top命令,可使用以下语句查询前N行记录:

select * from table_name where rownum<=10;

top 命令SQLServer-sybase-oracle

标签:使用   c   sql   oracle   table   as   r   rom   server   

原文地址:http://www.cnblogs.com/rusking/p/3954747.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!