文章分类 - 2_3:mysql 练习
摘要:drop table if exists student; drop table if exists class; drop table if exists score; create table student( sno int(10) primary key auto_increment, sn
阅读全文
摘要:20、列出最低薪金大于 1500 的各种工作及从事此工作的全部雇员人数 select job,count(*) from emp group by job having min(sal)>1500; 正确的 分组统计过滤 + + +| job | count(*) |+ + +| 分析师 | 2 |
阅读全文
摘要:1、取得每个部门最高薪水的人员名称 1 各部门最高薪水 select deptno,max(sal) as maxsal from emp group by deptno; + + +| deptno | maxsal |+ + +| 10 | 5000 || 20 | 3000 || 30 | 2
阅读全文
摘要:1 创建部门表 dept create table DEPT ( DEPTNO int(2) not null, DNAME varchar(14), LOC varchar(13) ); alter table DEPT add constraint PK_DEPT primary key (DE
阅读全文