查询语句
select e_no,e_name,e_salary from employee;
select *from employee where dept_no = 10 or dept_no = 20;
select * ,(select d_name from dept d where d.d_no = e.dept_no ) 部门 from employee e where e_salary>800 and e_salary<2500;
select * ,(select d_name from dept d where d.d_no = e.dept_no ) 部门 from employee e where dept_no=20;
select * ,(select d_name from dept d where d.d_no = e.dept_no ) 部门 from employee e where e_salary=any(select max(e_salary) from employee e group by e.dept_no);
select d_name ,d_location ,(SELECT e_name from employee where e_name= 'BLAKE') 姓名 from dept d where d.d_no=(select dept_no from employee where e_name = 'BLAKE');
select e.e_name,d.d_name,d.d_location from employee e,dept d where e.dept_no = d.d_no;
select count(1) ,d.d_name from employee e ,dept d where e.dept_no = d.d_no group by e.dept_no;
select sum(e_salary),d.d_name from employee e ,dept d