日期:2014-05-17 浏览次数:20694 次
CREATE TABLE #t (id INT ) GO INSERT INTO #t ( id ) SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10 UNION ALL SELECT 11 UNION ALL SELECT 12 UNION ALL SELECT 13 UNION ALL SELECT 14 UNION ALL SELECT 15 select top 3 * from #t where id not in( select top 11 id from #t) /* (15 行受影响) id ----------- 12 13 14 (3 行受影响) */