标签:
SELECT * FROM (SELECT columns,ROWNUM AS RN FROM (SELECT DISTINCT columns FROM table WHERE 1=1)) T WHERE RN = ‘1‘ SELECT * from (SELECT columns,(ROW_NUMBER() OVER (ORDER BY column DESC)) RN FROM (SELECT DISTINCT columns FROM table) t1) t2 WHERE t2.RN>1 AND t2.RN<5
标签:
原文地址:http://www.cnblogs.com/myblogslh/p/4232373.html