Re: truncate all tables
From: Jacco Schalkwijk (NOSPAMjaccos_at_eurostop.co.uk)
Date: 04/30/04
- Next message: Don Peterson: "Re: oracle to sql server statement"
- Previous message: Zach Wells: "Re: Using SELECT with EXISTS"
- In reply to: mikey: "truncate all tables"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 30 Apr 2004 16:45:24 +0100
One warning to add to the above answers:
You can't truncate a table if it is referenced by a foreign key. You will
have to drop the foreign key before you can truncate the table, and recreate
it later. Disabling the foreign key constraint or emptying the referencing
table won't work
-- Jacco Schalkwijk SQL Server MVP "mikey" <anonymous@discussions.microsoft.com> wrote in message news:69c201c42ec5$08637fb0$a601280a@phx.gbl... > Hi does anyone know of a cmd that will truncate all the > tables in a database of all its data while keeping table > structures in place? > > Thanks for any help Mikey
- Next message: Don Peterson: "Re: oracle to sql server statement"
- Previous message: Zach Wells: "Re: Using SELECT with EXISTS"
- In reply to: mikey: "truncate all tables"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|