Basic Logics · Real Scenario Logic's

To View List of ASCII Characters in SQL Server

Introduction

The goal of this blog post is to know, how we can view the list of ASCII (American Standard Code for Information Interchange ) Characters in SQL Server.

To View ASCII Character’s List

SQL Script

SELECT
NO,CHAR(NO) AS Characters
FROM 
	(
	SELECT TOP 256 ROW_NUMBER() OVER (ORDER BY (SELECT NULL))-1 AS NO 
	FROM SYS.COLUMNS T CROSS JOIN SYS.COLUMNS T1
	) AS T
ORDER BY NO;

Image Pic

Conclusion

Thus, we can use the above script, to view the list of ASCII Characters in SQL Server. The above Script is unit tested in both Azure SQL db and on-premises.

Thanks for reading!

FOLLOW BLOG for interesting upcoming posts!

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s