Home » Uncategorized » MySql Update table column from another table colunm

MySql Update table column from another table colunm

Updating a table fields from another table columns we can user following syntax

There are two tables table1 and table2. Both table have common id value. To select appropriate field from table inner join in used and updating table1 fields from table2 fields set statement is used.

For example there are two tables with following fields
user(id,fname,lname,mobileno,address,);
personal(id,fname,lname,mobile_no);

Here c=consider user and person have common id then to update user from person we can use following query

This will update user table with person tables fields.

Managed by MochaHost - Fast & Easy WordPress Hosting