MySQL UPDATE Statement


Using MySQL UPDATE statement you can update existing data in a table. it can be a single column or multiple rows.

Here is a simple example of MySQL UPDATE:

UPDATE users 
user_address = 'Kolkata, India',
user_state = 'WB'
WHERE user_id = 247

You can also update fields depends on JOIN query on two or more tables.

UPDATE users
INNER JOIN score ON user.score_value = score.score_value
SET rank = rank * score_value

Leave a Reply

Your email address will not be published. Required fields are marked *