Cascade deletes with foreign key constraints.

Cascade deletes with foreign key constraints.

Post by Gateway Authorized Custome » Thu, 31 Jul 1997 04:00:00



Please see attached.
Thanks
Darsh Mann
begin 600 SqlQCasdel.DOC
<encoded_portion_removed>
end

 
 
 

Cascade deletes with foreign key constraints.

Post by Tibor Karasz » Fri, 01 Aug 1997 04:00:00


Darsh,

Quote:> Does SQL Server support automatic cascade deletes for situations such as

this one?
Not without triggers.

Quote:> If so, how does one implement this feature?

With triggers. I guess that you already have the answers, and
unfortunaltely, there's not much more to say, really.

I prefer, however, to do all modificatione in stored procedures. Benefits
include: abstraction, less dependencies (for the client programs), you
really _have_ to think (design) before you write yur client apps, security
(you don't have to GRANT DELETE to a user), etc...
So perform the cascading function in a procedure, and you can keep your
constraints and drop your (cascading) triggers!
--

MCSE, MCSD, MCT, SQL Server MVP
Cornerstone Sweden AB



Quote:> Please see attached.
> Thanks
> Darsh Mann