dimanche 25 janvier 2015

How do I drop all constraints from all tables?


I want to drop all default constraints, check constraints, unique constraints, primary keys and foreign keys from all tables in a SQL Server database. I know how to get all the constraint names from sys.objects, but how do I populate the ALTER TABLE part?





Aucun commentaire:

Enregistrer un commentaire