current_dept_emp
Documentation | Employees (MySQL database) |
Name | current_dept_emp |
Columns
Key | Name | Data type | Null | Attributes | References | Description | ||
---|---|---|---|---|---|---|---|---|
1 | emp_no | int(10, 0) | Employee identification number. | |||||
Employee identification number. |
||||||||
2 | dept_no | char(4) | Departament identification number. | |||||
Departament identification number. |
||||||||
3 | from_date | date | Date the employee started work in the department. | |||||
Date the employee started work in the department. |
||||||||
4 | to_date | date | Date the employee left the department. | |||||
Date the employee left the department. |
Script
select `l`.`emp_no` AS `emp_no`,`d`.`dept_no` AS `dept_no`,`l`.`from_date` AS `from_date`,`l`.`to_date` AS `to_date` from (`employees`.`dept_emp` `d` join `employees`.`dept_emp_latest_date` `l` on(((`d`.`emp_no` = `l`.`emp_no`) and (`d`.`from_date` = `l`.`from_date`) and (`l`.`to_date` = `d`.`to_date`)))) |
Exported: 2018-11-09 14:32, Last imported: 2018-08-06 09:21