MySQL UPDATE Statement

MySQL SELECT

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 
SET 
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

For any types of queries, you can contact us on info@namasteui.com.

You may like:  INSERT ... ON DUPLICATE KEY UPDATE

Leave a Reply

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