本文主要是介绍MySQL/181. Employees Earning More Than Their Managers 超过经理收入的员工,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
题目
代码部分一(1936ms)
SELECta.Name AS EmployeeFROM Employee a WHERE a.Salary>(SELECT b.Salary FROM Employee b WHERE a.ManagerId=b.Id);
代码部分二(732ms)
SELECTa.Name AS EmployeeFROM Employee AS a,Employee AS bWHERE a.ManagerId=b.Id AND a.Salary>b.Salary;
代码部分三(584ms)
SELECTa.Name AS EmployeeFrom Employee AS aJOIN Employee AS b ON a.ManagerId=b.IdAND a.Salary>b.Salary;
这篇关于MySQL/181. Employees Earning More Than Their Managers 超过经理收入的员工的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!