Created
November 13, 2014 13:25
-
-
Save ststeiger/c897c1ae17df17cfbdc3 to your computer and use it in GitHub Desktop.
SELECT the ASCII-chart in SQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; | |
| WITH CTE AS | |
| ( | |
| SELECT | |
| 0 AS num | |
| ,CAST(null AS varchar(100)) AS chr | |
| UNION ALL | |
| SELECT | |
| CTE.num + 1 AS num | |
| ,CAST(CHAR(CTE.num) AS varchar(100)) AS chr | |
| FROM CTE | |
| WHERE cte.num < 255 | |
| ) | |
| SELECT * FROM CTE | |
| OPTION (MAXRECURSION 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment