更新或删除数据库中的多个或单个 [英] update or delete multiple or single in database

查看:81
本文介绍了更新或删除数据库中的多个或单个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我有2个表中的列名称电话号码用于前客户表和信息表。

其中客户表的主键和信息表具有与外键相同的列。

我想更新或删除一个电话号码。

我现在有一个问题是,我必须写两个查询来更新或删除2个表或更新/删除一个表会影响其他表同时。



提前谢谢...

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...

推荐答案

如果你要更新,请更新表客户。



如果您要删除,请为客户和信息表写两个查询。如果没有,当你离开他们每个人时,它会生效
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


这篇关于更新或删除数据库中的多个或单个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆