Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Need help in deleting Records (http://www.go4expert.com/forums/help-deleting-records-t28845/)

sphamasango 8Aug2012 12:43

Need help in deleting Records
 
Hi.
Can any one help with a solution.
I have three tables in a database:"tableCustomer","tableOrders","tableOrder Prints".now I need to delete all related records in table “order” before deleting the customer. Given that the table “OrderPrints” is also related to the table “Order”, I must delete all related records first! Please help

xpi0t0s 14Aug2012 12:38

Re: Need help in deleting Records
 
How can we help without more detail? You're correct - to maintain database integrity you must delete all related records first. How to determine what records are related is the question here. You can use SELECT...WHERE to experiment, and when you get the result you like you can do DELETE...WHERE using the same WHERE clause.


All times are GMT +5.5. The time now is 18:39.