Basic Logics · Real Scenario Logic's

To Identify Available SQL Data Types

Introduction

In this blog post, we are going to see what are the available datatypes in SQL and how to identify it.

What are Available SQL Data Types

Available SQL Datatypes

To Identify Available SQL Data Types

We can use sys.types ( System Catalog View) to identify both System and User-Defined Datatypes.

SQL Script to identify Available System Data Types

SELECT * FROM sys.types where is_user_defined=0;

Image Pic

To Identify Available System Data Types

SQL Script to identify Available User-Defined Data Types

SELECT * FROM sys.types where is_user_defined=1;

Image Pic

To Identify Available User-Defined Data Types

If you find any datatypes that are missed to mention above, Please comment those.

Conclusion

Thus, we saw the available system and user-defined datatypes in SQL and also the method of identify it. This is applicable for both Azure SQL DB and On-Premises. Unit Tested as well.

Thanks for reading and Follow Blog and Show your Support for many more interesting upcoming Posts!

Advertisement

One thought on “To Identify Available SQL Data Types

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