摘要: SQL> --查询所有部门的信息和部门下的所有员工信息SQL> select e.empno,e.ename,job,d.deptno,d.dname 2 from emp e,dept d 3 where e.deptno = d.deptno; EMPNO ENAME JOB DEPTNO DN 阅读全文
posted @ 2016-03-17 09:05 岁月刀歌 阅读(208) 评论(0) 推荐(0)
摘要: SQL> -- sum 函数用来求和SQL> -- 计算一下每一个月要发多少工资,不含奖金SQL> select sum(sal) from emp; SUM(SAL) 29025 SQL> select sal from emp; SAL 800 1600 1250 2975 1250 2850 阅读全文
posted @ 2016-03-17 09:01 岁月刀歌 阅读(281) 评论(0) 推荐(0)