#How to use update statement to associate multiple tables?
Update statement multi-table association method:
1) The simplest form
SQL code
- - It is confirmed that all customer_ids less than 1000 in the customers table are 'Beijing'
1 2 3 4 |
|
2) Two-table (multiple-table) association update -- only the connection in the where clause
SQL Code
1 2 3 4 5 6 7 |
|
3) Two tables (multiple tables) related update -- the modified value is calculated from another table
SQL Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
|
Recommended Tutorial: "sql video tutorial"
The above is the detailed content of How to use update statement to associate multiple tables?. For more information, please follow other related articles on the PHP Chinese website!