Home > Archive > MS SQL Server > December 2005 > Delclarative RI in SQL Server 2005









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Delclarative RI in SQL Server 2005
Don

2005-12-30, 1:23 pm

Does anyone know if in SQL Server 2005 declarative RI can be used to NULL a
referenced field on delete of a record from the parent table?

Any help is appreciated.

Don
Dan Guzman

2005-12-30, 1:23 pm

Yes, there is a SET NULL option when the foreign key constraint is created.
The foreign key column(s) must of course be nullable.

--
Happy Holidays

Dan Guzman
SQL Server MVP

"Don" <Don@discussions.microsoft.com> wrote in message
news:FC073BAB-8767-44C7-9FDC- CACF6E66AC84@microso
ft.com...
> Does anyone know if in SQL Server 2005 declarative RI can be used to NULL
> a
> referenced field on delete of a record from the parent table?
>
> Any help is appreciated.
>
> Don



Don

2005-12-30, 8:23 pm

Thank you very much

"Dan Guzman" wrote:

> Yes, there is a SET NULL option when the foreign key constraint is created.
> The foreign key column(s) must of course be nullable.
>
> --
> Happy Holidays
>
> Dan Guzman
> SQL Server MVP
>
> "Don" <Don@discussions.microsoft.com> wrote in message
> news:FC073BAB-8767-44C7-9FDC- CACF6E66AC84@microso
ft.com...
>
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com