日期:2014-05-16 浏览次数:20747 次
SELECT A.NAME, B.NAME FROM TEST A JOIN TEST B ON A.NAME > B.NAME; --测试 [TEST@myorcl] SQL>WITH T1 AS 2 (SELECT 'A' COL 3 FROM DUAL 4 UNION ALL 5 SELECT 'B' COL 6 FROM DUAL 7 UNION ALL 8 SELECT 'C' COL 9 FROM DUAL 10 UNION ALL 11 SELECT 'D' COL 12 FROM DUAL 13 )SELECT A.COL,B.COL 14 FROM T1 A,T1 B 15 WHERE A.COL > B.COL 16 ; C C - - D C D B D A C B C A B A