MYSQL
June 3, 2026 1 min read

Data Updates in MYSQL: Mastering Update Queries for Modifying Records

HS
HEMANT SINGH
Technical Writer & Educator

An update query is used to update records in the table.

For this query command, we will use the given table as an example.

Table: users

idfirst_namelast_nameemail
1AmanSinghaman@gmail.com
2RakeshSinghrakesh@gmail.com

 

Update records change first_name to Amit which has id 1

UPDATE users SET first_name="Amit" WHERE id=1;

Table: users

idfirst_namelast_nameemail
1AmitSinghaman@gmail.com
2RakeshSinghrakesh@gmail.com

Update multiple fields

UPDATE users SET first_name="Ramesh", last_name="Kumar" WHERE id=2;

Table: users

idfirst_namelast_nameemail
1AmitSinghaman@gmail.com
2RameshKumarrakesh@gmail.com