Question: Write a stored function that takes an employee id as input and returns how long (in years) an employee has been a part of the
Write a stored function that takes an employee id as input and returns how long (in years) an employee has been a part of the company. For convenience, we have provided an attribute in the employee table called 'joiningDate'. Use the function to write an sql query that lists down all the employees and their associated duration of employment.
Step by Step Solution
3.51 Rating (158 Votes )
There are 3 Steps involved in it
Sure you can create a stored function in SQL to calculate the duration of employment fo... View full answer
Get step-by-step solutions from verified subject matter experts
