时间:2021-07-01 10:21:17 帮助过:22人阅读
INSERT INTO users
VALUES(1,‘a‘),
(2,‘b‘),
(3,‘c‘);
或
INSERT INTO users
SELECT 1,‘a‘ UNION
SELECT 2,‘b‘ UNION
SELECT 3,‘c‘ ;
将3号员工的last_name 修改为‘drelexer‘
UPDATE my_employees SET last_name =‘drelexer‘ WHERE id =3;
将所有工资少于900的员工的工资修改为1000
UPDATE my_employees SET salary=9000 WHERE salary<900;
将userid为Bbiri的USER表和my_employees表的记录全部删除
DELETE u,m
FROM USER u
INNER JOIN my_employees m
ON u.userid=m.userid
WHERE u.userid=‘Bbiri‘;
mysql 数据的增删改例题
标签:inner mysql 子查询 插入 date name from 查询 update