Is it possible to disable Unique and Foreign Key constraints before creating the tables of a database using T-SQL?. Like for example, in MySQL (tested in version 5.1) if you have a SQL script that creates the database schema you can put the following:
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
at the beginning of the script (before any CREATE TABLE statement) to disable the mentioned constraints. Then at the end of the script you can use the following to enable them again.
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
Is there something similar for SQL Server 2005?