SQL Server: drop table cascade equivalent?
问题 In oracle, to drop all tables and constraints you would type something like DROP TABLE myTable CASCADE CONSTRAINTS PURGE; and this would completely delete the tables and their dependencies. What\'s the SQL server equivalent?? 回答1: I don't believe SQL has a similarly elegant solution. You have to drop any related constraints first before you can drop the table. Fortunately, this is all stored in the information schema and you can access that to get your whack list. This blog post should be