"hire_date" vs "from_date"
I noticed there's also a "hire_date" column in the t_employees table? What is the difference between the "hire_date" and "from_date" as shown in the video? Thanks.
Thanks for reaching out.
The hire_date column indicates the date that the employee has started working. The from_date and to_date columns indicate the start date and the end date for the current work that the employee has worked. Let's check for emp_no=10001. If we run the following query:
SELECT * FROM employees WHERE emp_no = 10001;
we see Georgi Facello has started working at 1986-06-26. This is his career start for the company. But in this company he has worked at different positions during different periods. If we run the following query:
SELECT * FROM salaries WHERE emp_no = 10001;
we see all different periods of work with all salaries and the columns from_date and to_date for all his previous jobs. If he is currently working at particular position the date is set to 9999-01-01.
Hope this helps.