Click here to Skip to main content
15,918,404 members
Please Sign up or sign in to vote.
0.00/5 (No votes)

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?

1 solution


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.

Share this answer
[no name] 26-Dec-12 4:25am    
Please Upvote the answer too. Thanks

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

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900