|
-
Originally posted by jmodic
Shure, they wil ALL work, why shouldn't they? (Hovewer the results you get from them might not be exactly what you have inspected ).
Anyhow, the original question is too general to be answered exactly -
it must have been much more precise.
Well ofcourse the Q isnt precise, but what i had feeling from this post was, he wanted ** TOP ** 3 salaries...
Originally posted by jmodic
Anyway, to answer your question about the above queries and the "competing" values on the third position, let's say that the salaries in the sescending order are:
- EMP1: 10.000
- EMP2: 8.000
- EMP3: 5.000
- EMP4: 5.000
- EMP5: 5.000
- EMP6: 3.000
In this case the first query will list only EMP1 and EMP2, while the second and the third will list EMP1, EMP2 and *any ONE* of the remaining eployees that earn 5.000. So the second and the third query will alwways return three records, but in case of the equal salaries you dont know which one of those with the same rank will be displayed.
Assume data is some thing like this
- EMP1: 10.000
- EMP2: 10.000
- EMP3: 10.000
- EMP4: 8.000
- EMP5: 5.000
- EMP6: 3.000
Then ur query will return EMP1, 2, 3 with SAL=10...but according to subject & post of the poster, this is not he wanted...(i assume/guess)
Abhay.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|