2011-04-21
展开全部
FROM emp, dept
WHERE emp.DEPTNO = dept.DEPTNO
AND dept.DNAME = 'SALES'
7) INSERT INTO emp(EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES(7935, 'David', 'CLERK', 7902, '01-5月-81', 1800, 300, 20)
INSERT INTO dept(DEPTNO, DNAME, LOC) VALUES(50, 'HR', 'Paris')
8) SELECT DEPTNO, COUNT(*) AS totalStaff, SUM(SAL) AS totalSalary
FROM dept LEFT JOIN emp
ON dept.DEPTNO = emp.DEPTNO
GROUP BY DEPTNO
9) SELECT empno,ename,job,hiredate, dept.deptno,dept.dname,loc
FROM emp, dept
WHERE emp.DEPTNO = dept.DEPTNO
AND hireDate > '06-01-1981'
这里的日期大小不同SQL方言可能要适当变动,
10) UPDATE emp SET sal = sal * 110% WHERE SAL < 1800
另外,团IDC网上有许多产品团购,便宜有口碑
WHERE emp.DEPTNO = dept.DEPTNO
AND dept.DNAME = 'SALES'
7) INSERT INTO emp(EMPNO, ENAME, JOB, MGR, HIREDATE, SAL, COMM, DEPTNO)
VALUES(7935, 'David', 'CLERK', 7902, '01-5月-81', 1800, 300, 20)
INSERT INTO dept(DEPTNO, DNAME, LOC) VALUES(50, 'HR', 'Paris')
8) SELECT DEPTNO, COUNT(*) AS totalStaff, SUM(SAL) AS totalSalary
FROM dept LEFT JOIN emp
ON dept.DEPTNO = emp.DEPTNO
GROUP BY DEPTNO
9) SELECT empno,ename,job,hiredate, dept.deptno,dept.dname,loc
FROM emp, dept
WHERE emp.DEPTNO = dept.DEPTNO
AND hireDate > '06-01-1981'
这里的日期大小不同SQL方言可能要适当变动,
10) UPDATE emp SET sal = sal * 110% WHERE SAL < 1800
另外,团IDC网上有许多产品团购,便宜有口碑
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询