;

How to Get or Find Out Identity Column Without Using the Actual Column Name in MS SQL Server


Tutorialsrack 09/12/2020 SQL SQL Server

In this article, you will learn how to get or find out the identity column without using the actual column name or without knowing the actual column name.

Here is an example of how to get the identity column without using the actual column name.

Code - This Query Return Identity Column
SELECT $identity FROM TableName 

The above query will return the identity column of the table.

Error

Msg 207, Level 16, State 1, Line 9

Invalid column name '$identity'.

I hope this article will help you to understand how to get or find out the identity column without using the actual column name.

Share your valuable feedback, please post your comment at the bottom of this article. Thank you!


Related Posts



Comments

Recent Posts
Tags