I have a table with a unique constraint on one or more fields. Given the constraint name, I want to query the system views to get the list of fields that are part of this constraint.
SQL Server 2005.
Thanks.
I have a table with a unique constraint on one or more fields. Given the constraint name, I want to query the system views to get the list of fields that are part of this constraint.
SQL Server 2005.
Thanks.
Look at information_schema.constraint_column_usage
select column_name from information_schema.constraint_column_usage
where constraint_name = 'your constraint'