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.
Answer rating: 100% (QA)
Sure you can create a stored function in SQL to calculate the duration of employment fView the full answer