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.
SELECT $identity FROM TableName
The above query will return the identity column of the table.
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!
Comments