RE: How Can I Generate a List of the Columns that Comprise the Primary Key?
SELECT column_name name, constraint_name name FROM '+@destination_DatabaseName+'.information_schema.key_column_usage WHERE constraint_catalog='''+@destination_DatabaseName +''' and table_name = '''+@destination_TableName+''' ORDER BY constraint_name, ordinal_position
2004-02-06
1 reads