I'm working with some tables/columns that were renamed at some point, but the names of the primary/foreign keys are still based on the previous names.
In SSMS is there any (preferably automatic) way to reset the name of a key to what the default name would be if it were newly created?
Best Answer
There's no way to do this automatically but you can query the catalogue views to find constraint names not in the desired pattern then generate the desired script that way.
Something like