当前位置:操作系统 > Unix/Linux >>

各数据库取前十条数据的方法

各数据库取前十条数据的方法
 
db2:   www.zzzyk.com  
       select * from tab fetch first 10 rows only 
  oracle: 
      select * from tab where rownum <=10 
  sqlserver: 
      select top 10 * from tab 
  mysql: 
      select * from tab limit 10
 
 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,