Click here to Skip to main content
15,070,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
If i have a column name phone no in 2 tables for ex customer table and information table.
Where customer table having primary key and information table having same column as foreign key.
I want to update or delete one phone no.
I have a question now is that, I have to write two queries to update or delete 2 tables or updating/deleting one table will effect other table simultaneously.

Thanks in advance...
Posted

1 solution

If you are going to update, please update the table customer.

If you are going to delete, please write two queries for customer and information table. If not, it will effect when you have left join with each of them
   
Comments
binadi007 15-Oct-13 2:45am
   
In Update query, if i update only customer table then it affects both table i.e customer and information or only customer table be effected
coded007 15-Oct-13 2:50am
   
It will effect both Customer and Information tables as you are designed with foreign key relation ship

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