摘要:
最近学习数据库的分页算法,提到第一种SELECTTOP页大小*FROMtable1WHEREidNOTIN(SELECTTOP页大小*(页数-1) idFROMtable1ORDERBYid)ORDERBYidHumanResources.Employee是Adventrureworks里的表,一共290条数据 SELECT top 10 * FROM HumanResources.Employee awhere EmployeeID not in ( SELECT TOP 200 EmployeeIDorder by EmployeeID)order by EmployeeI... 阅读全文