//请在下面补齐查询一的MySQL语句 /*********begin*********/ select ename,eid,sex from emp where did in (select did from dept where dname='cwb' ) /*********end*********/ and birth<=all (select birth from emp where did in (select did from dept where dname='yfb' ) ); //请在下面输入查询二的MySQL语句 /*********begin*********/ select ename,income,outcome from emp,sal,dept where emp.eid=sal.eid and emp.did=dept.did and dname='cwb'and income>5200; /*********end*********/
//请在下面输入查询一的MySQL语句 /*********begin*********/ selectcount(eid) from emp where did= (select did from dept where dname='cwb'); /*********end*********/ //请在下面输入查询二的MySQL语句 /*********begin*********/ selectcount(eid) from emp groupby did; /*********end*********/ //请在下面输入查询三的MySQL语句 /*********begin*********/ select emp.ename from emp,sal where emp.eid=sal.eid orderby income; /*********end*********/
//请在下面输入创建cx_sal的视图的MySQL语句 /*********begin*********/ createor replace view cx_sal as select ename,income,outcome from emp,sal,dept where emp.eid=sal.eid and emp.did=dept.did and dname='cwb'; /*********end*********/ //请在下面输入查询财务部雇员薪水情况视图的MySQL语句 /*********begin*********/ select*from cx_sal; /*********end*********/