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.

Continue Statement

Continue statement can used with iteration statement (for,while,do while).
In for statement continue transfer the control to updation of loop variable. In while and do while statement continue transfer control to condition of the loop.

Example

When value of i is 5 then continue statement is executed and control is transferred to beginning of loop and counter variable i is incremented by one.

When i==5 then continue statement is executed and no other statement followed by continue is executed

Result

Continue with label

Whenever continue is used with label then control is transferred to beginning of label.

Result

Break Statement

Break statement can use in looping statement (for,while,do while) and also in switch case.
Break statement is used to terminate the execution of the current loop or current switch.
Break statement is also used to the execution of label.
Break statement is used in two variation

1. Break
2. Break label

1. Break

Example

Result

2. Break with label

Example

Result