table Employee EmpId Name MonthlySalary DateofJoining Suggest a sql server query to find out the employee details whose having salary greater than their yers of experiance
Quote:do you have idea how to find this answer. It is asked to me today in interview.
DateofJoining
SELECT * FROM Employee WHERE MonthlySalary > DATEDIFF(yy, DateofJoining, GETDATE())
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)