Self join to a table
Posted
by Mohit
on Stack Overflow
See other posts from Stack Overflow
or by Mohit
Published on 2010-06-14T05:29:17Z
Indexed on
2010/06/14
5:32 UTC
Read the original article
Hit count: 373
self-join
I have a table like
Employee
==================
name salary
==================
a 10000
b 20000
c 5000
d 40000
i want to get all the employee whose salary is greater than A's salary. I don't want to use any nested or sub query. It has been asked in an interview and hint was to use self join. I really can't figure out how to achieve the same.
© Stack Overflow or respective owner