T-SQL Cercare le colonne di tipo Identity in un Database
The following snippet shows how to find identity columns inside database.
You can also apply where condition to filter on a table name.
SELECT * FROM sys.tables T INNER JOIN sys.columns C ON T.object_id = C.object_id WHERE C.is_identity = 1
Enjoy snippet!
Di seguito uno snippet utile per cercare nel database le colonne che sono Identity.
Si può anche applicare una condizione per filtrare la ricerca su una specifica tabella.
SELECT * FROM sys.tables T INNER JOIN sys.columns C ON T.object_id = C.object_id WHERE C.is_identity = 1
Enjoy snippet!
Lascia un commento