I want to create a list of columns in SQL Server 2005 that have identity columns and their corresponding table in T-SQL.
Results would be something like:
TableName, ColumnName
I can get a list of unique constraints fairly easily with the following query:
select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS where CONSTRAINT_TYPE='UNIQUE'
But how do I get a list of the columns that each unique constraint applies to?
How can you get a list of the views in a SQL server database that have indexes (i.e. indexed views)?
I've found it's pretty easy to run an "ALTER VIEW" as I'm developing and overlook that I'm not only …