Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The detailed method of realizing Multi-table Association Update by mysql

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

I don't know if you have any understanding of the article similar to mysql to achieve a detailed method of multi-table association update. Today, I'm here to give you a brief talk. Interested in the words together to see the body part of it, I believe that after reading mysql to achieve multi-table association update detailed method you will certainly gain.

Create the following simple model and construct some test data:

in a certain service acceptance subsystem BSS,

--customer data table create customers(customer_id number(8) not null, --customer identifier city_name varchar2(10) not null, --city customer_type char(2) not null, --customer type...) create unique index PK_customers on customers (customer_id)

For some reason, the information of the city where the customer is located is not accurate, but in the CRM subsystem of the customer service department, accurate information such as the city where 20% of the customers are located is obtained through active service, so you extract this information into a temporary table:

create table tmp_cust_city(customer_id number(8) not null,citye_name varchar2(10) not null,customer_type char(2) not null)

1)the simplest form

--It is confirmed that all customers with customer_id less than 1000 in customers table are 'Beijing'--1000 are old customers in this city before the company goes nationwide:)update customersset city_name ='Beijing'where customer_id=2)

After reading mysql implementation of multi-table association update detailed method of this article, what do you think? If you want to know more about it, you can continue to pay attention to our industry information section.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report