SQL 整理

批量插入

insert into table select ... union all select...
insert into table (...) values (...) , (...)
insert into table select ... from ...

高效分页

select t.* 
from 
(
select top 6926911 * ,ROW_NUMBER() over (order by ID desc ) RN
from test
)
t where RN>6926901
--和Oracle有效率的写法一样,都是尽可能在子查询去过滤
原文地址:https://www.cnblogs.com/codealone/p/3440627.html