Du behøver ikke PL/SQL at generere en alfabetisk sekvens. Du kunne gøre det i ren SQL ved hjælp af Rækkegenerator metode.
WITH combinations AS
(SELECT chr( ascii('A')+level-1 ) c FROM dual CONNECT BY level <= 26
)
SELECT * FROM combinations
UNION ALL
SELECT c1.c || c2.c FROM combinations c1, combinations c2
UNION ALL
SELECT c1.c
|| c2.c
|| c3.c
FROM combinations c1,
combinations c2,
combinations c3
/
Ovenstående ville give dig alle mulige kombinationer c1 , c2 , c3 for enkelt og to tegn. For flere kombinationer kan du bare tilføje kombinationer som c4 , c5 osv.