| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|||||||
| Oracle Interview / Technical Questions Kindly solve an many as questions you can. It will sharpen your skills and those solutions will help others too. |
![]() |
|
|
LinkBack | Thread Tools | Rate Thread | Display Modes |
|
|
#1 (permalink) |
|
Junior Member
Join Date: Aug 2006
Posts: 15
Thanks: 5 Thanked 1 Times in 1 Posts Thanks: 5
Thanked 1 Time in 1 Post
Rep Power: 3
|
Hi friends,
Plse tel me the query to find the second and third maximum salary from emp table. Thanks suma |
|
|
|
| The Following User Says Thank You to sumahalesh28 For This Useful Post: |
Payal_Maheshwari (06-06-08)
|
|
|
#2 (permalink) |
|
Super Moderator
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117 Thanked 241 Times in 198 Posts Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51
|
Re: oracle query
this is duplicate post...
n th max/min using SQL
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation. |
|
|
|
| The Following User Says Thank You to sk_kireeti For This Useful Post: |
sumahalesh28 (09-05-07)
|
|
|
#5 (permalink) |
|
Junior Member
Join Date: Nov 2007
Age: 25
Posts: 2
Thanks: 0 Thanked 0 Times in 0 Posts Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2
|
Re: query to find 2nd or 3rd maximum salary from emp table
ok friend do not worry i am sending one query for you .you try this.
select * from emp e where 2 =(select count(distinct sal) from emp where e.sal<=sal) or 3=(select count(distinct sal) from emp where e.sal<=sal); if you got the answer ok.otherwise u can send another thread to me .my mail id is:pradeep.tanugula@gmail.com.Please put subject as oracle query for second or third max salary. Best of Luck. byeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee.... TANUGULA PRADEEP |
|
|
|
|
|
#6 (permalink) |
|
Junior Member
Join Date: Sep 2008
Age: 25
Posts: 5
Thanks: 3 Thanked 0 Times in 0 Posts Thanks: 3
Thanked 0 Times in 0 Posts
Blog Entries: 2
Rep Power: 1
|
how to find employee information whose salary is second highest salary in his department
my mail id : patil.pallavi@gmail.com |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| SQL query to display maximum number of rows(not records) in a table? | chytrahs | ORACLE , SQL SERVER , SYBASE & Others | 1 | 25-01-07 02:23 AM |