Get the App
SLTechnology News&Howtos  ›  Database  › 

How to use the update statement to associate multiple tables?

Shulou Source: shulou.com Published: 2022-06-01 01:22:14 09月28日 Update

Editor to share with you how to use the update statement to associate multiple tables? I hope you will learn a lot after reading this article. Let's discuss it together.

How to use the update statement to associate multiple tables?

The method of associating multiple tables in update statements:

1) the simplest form

SQL code

-- it has been confirmed that all customer_id less than 1000 in the customers table are 'Beijing'.

-- less than 1000 are all old customers in the city before the company went nationwide:) update customersset city_name=' Beijing 'where customer_id

Tags: Correlation statement code alias password generation letter customer sequence article Beijing ordinary element national company size sentence character string done Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Redmi MariaDB MySQL Xiaomi