Self join to a table

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-05 10:33:29
select e1.* from Employee e1, Employee e2  where 
           e2.name = 'a' and
           e1.salary > e2.salary

Using self join

 select e1.* from Employee e1 join Employee e2  on 
           e2.name = 'a' and
           e1.salary > e2.salary
Chinjoo
SELECT emp1.* FROM Employee emp1 JOIN Employee emp2
ON emp2.Name = 'A' and emp1.Salary > emp2.Salary
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!