随笔分类 -  Oracle

摘要:1.列出至少有一个员工的所有部门。分析:每个部门有多少员工 —— 根据部门编号进行分组select deptno,count(*) from emp group by deptno having count(*) >= 1; 2.列出薪金比“SMITH”多的所有员工。分析:先查询出SMITH工资 : 阅读全文
posted @ 2016-02-21 22:04 M-li 阅读(8690) 评论(0) 推荐(2)
摘要:--创建表create table abc(id number(4) not null primary key,username varchar2(20) not null,pwd varchar2(20) not null);--创建序列create sequence abc_sequence ... 阅读全文
posted @ 2015-07-08 16:38 M-li 阅读(154) 评论(0) 推荐(0)