日期:2014-05-17 浏览次数:20491 次
WITH a1 (id) AS
(
SELECT 8506943 UNION ALL
SELECT 8506943 UNION ALL
SELECT 8506943 UNION ALL
SELECT 8506943 UNION ALL
SELECT 8506995 UNION ALL
SELECT 8506995 UNION ALL
SELECT 8506995
)
,a2 AS
(
SELECT MAX(id) id FROM a1
)
SELECT (select id FROM a2)+DENSE_RANK() OVER(ORDER BY id) AS id
FROM a1