[thelist] MSSQL: Deleting rows with circular FK constraints
Wade Armstrong
wade at wadearmstrong.com
Mon Sep 22 13:19:02 CDT 2003
On 9/22/03 Joshua Olson <joshua at waetech.com> wrote:
>I inherited a db structure with circular COLUMN REFERENCE constraints.
>I'm
>trying to purge data with either TRUNCATE TABLE or DELETE FROM, but the
>database won't let me because of the constraints. Other that dropping
>and
>rebuilding the constraints, is there any way to purge the data from the
>tables?
I don't have BOL in front of me now, but there's some switch - I think
it's WITH NOCHECK, it might be WITH NOCHECK ON, that causes MSSQL to
ignore constraints.
Ah. Of course I still have google:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref
/ts_aa-az_3ied.asp
(watch wrap)
describes ALTER TABLE syntax with a bit on WITH NOCHECK, should be
applicable to the change you're trying to make.
Wade
More information about the thelist
mailing list