要求:
使用 MySQL 完成
完成下面的功能
1.将所有员工薪水修改为5000元。
2.将姓名为’zhangsan’的员工薪水修改为3000元。
3.将姓名为’lisi’的员工薪水修改为4000元,sex改为female。
4.将xiaohong的薪水在原有基础上增加1000元。
CREATE TABLE employee(
id INT,
NAME VARCHAR(20),
sex VARCHAR(10),
birthday DATE,
salary FLOAT,
RESUME TEXT
);
INSERT INTO employee VALUES(1,"zhangsan","male","1980-11-25",2000,"good body");
INSERT INTO employee VALUES(2,"lisi","male","1980-04-25",1000,"good body");
INSERT INTO employee VALUES(3,"xiaohong","female","1978-11-25",4000,"good girl");
完成查看表数据效果图:查询表数据—> SELECT * FROM (表名称)我这里是employee
UPDATE employee SET salary=5000元;
UPDATE employee SET salary=3000 WHERE NAME="zhangsan";
UPDATE employee SET salary=4000,sex="female" WHERE NAME="lisi";
SELECT salary FROM employee WHERE NAME="xiaohong"l;
UPDATE employee SET alary=5000+1000 WHERE NAME="xiaohong";