Adsense Ad

Monday, 7 August 2017

GENERATE ALPHABETS IN SEQUENCE WITH ORACLE SQL

SQL> -- HOW TO GENERATE ALPHABETS WITH ORACLE SQL QUERIES
SQL>
SQL>
SQL> SELECT CHR(X.RNO +64) "ALPHA" FROM (
  2                select level rno
  3                from dual
  4                connect by level <= 26 ) X ;

ALPHA
-----
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z

26 rows selected

SQL>