数据库分页

mysql 分页  SELECT * FROM TABLE_NAME LIMIT 10, 20 ;

SQL Server 2005 2000

    SELECT TOP @pagesize * FROM TABLE_NAME WHERE id not in (SELECT TOP @pagesize*(@page-1) id  FROM TABLE_NAME ORDER BY id) ORDER BY id
 

你可能感兴趣的:(数据库)