EMPLOYEES, 有四個字段,EMPLOYEE_ID:員工表(主鍵)、DEPT_ID:部門号、EMPLOYEE_NAME:員工姓名、EMPLOYEE_SALARY:員工工資。
建表語句CREATE TABLE EMPLOYEES(
EMPLOYEE_ID int not null primary key,
DEPT_ID int,
EMPLOYEE_NAME char(40),
EMPLOYEE_SALARY double
);
檢索出員工工資最高的員工姓名和工資
select * from employee where employee. salary= (select max(employee_salary) from employee)
檢索出部門中員工最多的部門号和此部門員工數量select dept_id,count(*) cno from user GROUP BY dept_id desc limit 1
,更多精彩资讯请关注tft每日頭條,我们将持续为您更新最新资讯!