Why do i have to drop all constraints (keys in general) before i can drop a table in sql server. I dont understand why this would be necess开发者_如何转开发ary if I have permissions to drop the table and the know how to do it why not drop all constraints for me?
Is there some sort of technical or database design reason for this?
Because of referential integrity, you (or someone else) might mistakenly attempt to delete a table that holds supporting information.
Just today, my office found an issue with records missing from a report due to account records being purged without checking for data integrity. Those records now have to be restored...
The idea is, as much as it's a pain to do, the process makes absolutely sure the operation is occurring as intended.
精彩评论