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

db2:
       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

猜你喜欢

转载自java-worker-cr.iteye.com/blog/1821694