I don’t know much about SQL at all, but I have a table and it has a unique key constraint which I can see in SSMS by expanding the Keys folder under my table. It makes one column, ‘name’, UNIQUE.
At the moment it’s completely unique, but I need to change it so name is unique for a specific ID in another column, ‘catflapID’. So names can be duplicated in the table but for each catflapID there can be no duplicates.
I know absolutely nothing of how to do this, and I need somehow to end up with a script that removes the existing constraint and adds my new constraint.
Any advice?
1 Answer