Sometime we need to character of ASCII code for many programming concern. Once, I had requirement not to allow any character other than few decided character in string. I created one temp table and by iterating loop, I added non-required character in that temp table and fire update query which remove non-required character from string. Anyway, this is something else and I will post this script later but right now I want to display character from its ASCII int in loop. I will iterate one loop for 256 times and will print all character with its ASCII int code.
DECLARE @counter INT
Reference: Ritesh Shah