Re: Disable relationships
From: Jacco Schalkwijk (jacco.please.reply_at_to.newsgroups.mvps.org.invalid)
Date: 09/09/04
- Next message: Eric Sabine: "Re: triggers opening an Access Form"
- Previous message: hngo01: "to create ASCII format text file in DST"
- In reply to: dw: "Disable relationships"
- Next in thread: dw: "Re: Disable relationships"
- Reply: dw: "Re: Disable relationships"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Sep 2004 17:37:23 +0100
ALTER TABLE <table_name> DISABLE CONSTRAINTS ALL
will disable all check and foreign key constraints on the table (but not
primary key and unique constraints), and you can later switch them back on
with
ALTER TABLE <table_name> ENABLE CONSTRAINTS ALL
-- Jacco Schalkwijk SQL Server MVP "dw" <cougarmana_NOSPAM@uncw.edu> wrote in message news:%23lGxQdolEHA.1152@TK2MSFTNGP11.phx.gbl... > Hello, all. We have a table that indicates the people in the SQL Server 2K > db who are duplicates. We'll need to go through a dozen or more tables > replacing anyone with that id # with the correct one. However, this will > be > painful with the current foreign key relationships we have. We'd have to > do > the tables in the correct order. Any way to temporarilly disable all > foreign > key relationships before running the script and then re-enable them? I > think > there's a way to do this in Oracle; just don't know if SQL Server has a > similar feature. Thanks. > >
- Next message: Eric Sabine: "Re: triggers opening an Access Form"
- Previous message: hngo01: "to create ASCII format text file in DST"
- In reply to: dw: "Disable relationships"
- Next in thread: dw: "Re: Disable relationships"
- Reply: dw: "Re: Disable relationships"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|