SQL Server: Script to find Identity Column of a Database

In this post, I am sharing one script to find all identity columns of a SQL Server Database.

We are using identity to generate auto_number in SQL Server table and this is also one of the common practice for all SQL Server Database Developer. This script will help us to find list of identity columns of a Database.

Below is a different script to find Identity columns:

First Script, using sys.objects and sys.identity_columns:

Second Script, using sys.tables and sys.identity_columns:


Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.

If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.

I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.

More from dbrnd.com