mysql> create table employee(
-> id int primary key ,
-> name varchar(50) not null,
-> gender varchar(10) not null,
-> salary int not null);
mysql> insert into employee values (1,"张三",'男',2000),(2,"李四",'男',1000),(3,"王五",'女',4000);
mysql> update employee set salary=5000;
mysql> update employee set salary=3000 where name="张三";
mysql> update employee set salary=4000, gender='女' where name="李四";
mysql> update employee set salary=salary+1000 where name="王五";
mysql> select * from employee;
+----+--------+--------+--------+
| id | name | gender | salary |
+----+--------+--------+--------+
| 1 | 张三 | 男 | 3000 |
| 2 | 李四 | 女 | 4000 |
| 3 | 王五 | 女 | 6000 |
+----+--------+--------+--------+
3 rows in set (0.00 sec)