You select CharsWITH BASE (letters, ascii) AS ( SELECT CHAR(65), 65 UNION ALL SELECT CHAR([ascii]+1), [ascii]+1 FROM BASE WHERE [ascii] < 90), RESULT (letters) AS ( SELECT CONVERT(varchar(10), letters) FROM BASE UNION ALL SELECT CONVERT(varchar(10), RESULT.letters + BASE.letters) FROM RESULT CROSS JOIN BASE WHERE LEN(RESULT.letters) < 3)SELECT lettersFROM RESULTORDER BY LEN(letters), letters
-------------------------------------From JapanSorry, my English ability is limited.