Auto commit
This commit is contained in:
parent
854e7b4f1b
commit
dceb62f983
@ -58,7 +58,22 @@ SELECT *
|
||||
FROM t_salary
|
||||
WHERE money >= 5000 AND money <= 8000;
|
||||
|
||||
#6
|
||||
#6 tj13 分组查询
|
||||
SELECT eid, MAX(money)
|
||||
FROM t_salary
|
||||
GROUP BY eid;
|
||||
|
||||
#7 tj14 多表联查+条件过滤
|
||||
SELECT d.dname, e.ename
|
||||
FROM t_employee e, t_department d
|
||||
WHERE e.did = d.did AND e.position = '经理';
|
||||
|
||||
#8
|
||||
CREATE VIEW v_hrm AS
|
||||
SELECT d.dname, e.ename, s.money, s.stime
|
||||
FROM t_employee e, t_department d, t_salary s
|
||||
WHERE e.did = d.did AND e.eid = s.eid
|
||||
ORDER BY s.stime DESC;
|
||||
|
||||
#9 触发器
|
||||
DELIMITER $$
|
||||
@ -98,3 +113,4 @@ CALL pro_GetTopSalary('d0001', @result);
|
||||
SELECT @result;
|
||||
```
|
||||
|
||||
### 第二套
|
||||
|
Loading…
x
Reference in New Issue
Block a user