DML是对表中的数据进行增、删、改的操作(INSERT 、UPDATE、 DELETE)
INSERT INTO 表名(列名1,列名2 ...)VALUES(列值1,列值2...);
create table emp( id int, name varchar(100), gender varchar(10), birthday date, salary float(10,2), job varchar(20), entry_date date, resume text );
insert into emp(id,name,gender,birthday,salary,entry_date,resume) values (1,'abc','female','2020-10-12',100000.00,'2020-10-12','good good');
insert into emp(id,name,gender,birthday,salary,entry_date,resume) values (2,'hhh','ggg','2020-10-12',100000.00,'2020-10-12','g0'), (3,'zzz','ggg','2020-10-12',100000.00,'2020-10-12','good')
UPDATE 表名 SET 列名1=列值1,列名2=列值2 。。。 WHERE 列名=值
UPDATE emp SET salary=9999
UPDATE emp SET salary=9 WHERE name = 'zzz'
UPDATE emp SET salary=8888,job='female' WHERE name='hhh';
UPDATE emp SET salary=salary+1000 WHERE name='abc';
DELETE FROM 表名 WHERE 列名=值
DELETE FROM emp WHERE name=‘abc’;
DELETE FROM emp;
TRUNCATE TABLE emp;