Click here to Skip to main content
12,764,177 members (40,121 online)
Rate this:
Please Sign up or sign in to vote.

is there any way to write a procedure to delete two tables specific row which they have relation with each other?

and the same question for update these two tables?
Posted 25-Dec-12 22:34pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1


Yes you can delete the specific rows of the two tables that are in relation to each other. If the two tables are in a relation of foreign key then you can delete the row by setting the cascaded delete option to on.

There is one more way to delete the record from the table. Add a column to the tables named as "IsDeleted" of type "Bool" then make the particular record value to set true in that column. This is mostly used in industries.

From these above two options you can chose any one. But preferably the 2nd option is widely accepted.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.170217.1 | Last Updated 26 Dec 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100