代码改变世界

随笔档案-2008年4月28日

【转】从第m条开始取n条的MSSQL语句

2008-04-28 18:20 by 拖鞋不脱, 735 阅读, 收藏,
摘要: 1. select top m * from tablename where id not in (select top n id from tablename) 2. select top m * into 临时表(或表变量) from tablename order by columnname -- 将top m笔插入 set rowcount n select * from 表变量 orde... 阅读全文