Wednesday, 24 July 2013

Logical SQL Query

SQL> SELECT SYS_CONNECT_BY_PATH(LEVEL,' ') "TRIANGLE SHAPE"
  2  FROM DUAL
  3  CONNECT BY LEVEL<=10
  4  ;

TRIANGLE SHAPE
------------------------------------------------------------
 1
 1 2
 1 2 3
 1 2 3 4
 1 2 3 4 5
 1 2 3 4 5 6
 1 2 3 4 5 6 7
 1 2 3 4 5 6 7 8
 1 2 3 4 5 6 7 8 9
 1 2 3 4 5 6 7 8 9 10

10 rows selected.

SQL>


Ur's
AmarAlam

1 comments:

Amar Alam said...

select substr('oracle',1,level) from dual connect by level<=6;

Post a Comment