DML是指数据操作语言,英文全称是Data Manipulation Language,用来对数据库中表的数据记录进行更新。 关键字:
思维图:
DML操作练习
create table if not exists mydb1.employee(
id int,
name varchar(20),
gender varchar(10),
salary double
);
insert into employee(id,name,gender,salary) values(1,'张三','男',2000);
insert into employee values(2,'李四','男',1000),(3,'王五','女',4000);
update employee set salary = 5000;
update employee set salary = 3000 where name = '张三';
update employee set salary = 4000,gender = '女' where name = '李四';
update employee set salary = salary + 1000 where name = '王五';
|