-
命題:寫出一條Sql語句: 取出表A中第31到第40記錄(自動增長的ID作為主鍵, 注意:ID可能不是連續的。)
oracle資料庫中:
1、select * from A where rownum<=40 minus select * from A where rownum<=30
sqlserver資料庫中:
1、select top 10 * from A where id not in (select top 30 id from A )
2、select top 10 * from A where id>(select max(id) from (select top 30 id A) as A)
mysql資料庫中:
SELECT * FROM A LIMIT 30,40
本文來自CSDN博客,轉載請標示出處:http: //blog.csdn.net/fszhaotianle/archive/2009/12/20/5044260.aspx