SELECT * FROM EmployeeDetails E WHERE EXISTS (SELECT * FROM EmployeeSalary S WHERE E.EmpId = S.EmpId);
CREATE TABLE NewTable SELECT * FROM EmployeeSalary;
DELETE E1 FROM EmployeeDetails E1 INNER JOIN EmployeeDetails E2 WHERE E1.EmpId > E2.EmpId AND E1.FullName = E2.FullName AND E1.ManagerId = E2.ManagerId AND E1.DateOfJoining = E2.DateOfJoining AND E1.City = E2.City;