Re: truncate table - with foreign key constraints
From: Dan Guzman (guzmanda_at_nospam-online.sbcglobal.net)
Date: 11/03/04
- Next message: aoxpsql: "Help for sp_updatestats"
- Previous message: Michael Cheng [MSFT]: "RE: Export data as bulk insert statement"
- In reply to: Zev Hochberg: "truncate table - with foreign key constraints"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 2 Nov 2004 22:39:28 -0600
TRUNCATE is simply not allowed with foreign key constraints in place.
You'll need to go through the trouble for dropping and recreating the
constraints in order to use TRUNCATE.
-- Hope this helps. Dan Guzman SQL Server MVP "Zev Hochberg" <hochberg@ncbi.nlm.nih.gov> wrote in message news:fe1b0fd8.0411021551.1101191@posting.google.com... >I have a database with foreign key constraints. I therefore can't > truncate tables to perform data loads. > > Is there an easy way to tell the system to ignore these constraints > for the term of a data load or truncation of data? > > I prefer not to have to remove the constraints, truncate tables, and > recreate constraints
- Next message: aoxpsql: "Help for sp_updatestats"
- Previous message: Michael Cheng [MSFT]: "RE: Export data as bulk insert statement"
- In reply to: Zev Hochberg: "truncate table - with foreign key constraints"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
Loading