![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Where can one find the identity column for a table in the INFORMATION_SCHEMA or the sys tables? Or is there a function that can return the name or id of the identity column for a particular table? |
#3
| |||
| |||
|
|
Where can one find the identity column for a table in the INFORMATION_SCHEMA or the sys tables? Or is there a function that can return the name or id of the identity column for a particular table? SELECT name FROM sys.columns WHERE object_id=OBJECT_ID('dbo.YourTableHere','U') AND is_identity=1 |
![]() |
| Thread Tools | |
| Display Modes | |
| |