skip to main | skip to sidebar

my notes on Java ,J2EE,Struts, EJB, Spring, AJAX

Monday, June 16, 2008

how to find the 2nd, 3rd ,4th ... nth highest salary of the employee from emp table?

select sal from emp e1 where (n-1)=(select count(DISTINCT sal)
from emp where sal > e1.sal )
Posted by java books at 2:36 AM
Labels: 2nd, 3rd, 4th ... nth, emp, employee, find, from, highest, how, of, oraexp, pl/sql, salary, table, the, to

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Enter your email address:

Delivered by FeedBurner

Blog Archive

  • ►  2015 (1)
    • ►  March (1)
  • ►  2014 (3)
    • ►  May (3)
  • ►  2013 (1)
    • ►  November (1)
  • ►  2010 (6)
    • ►  May (1)
    • ►  April (5)
  • ►  2009 (7)
    • ►  December (1)
    • ►  June (1)
    • ►  February (5)
  • ▼  2008 (30)
    • ►  December (1)
    • ►  November (5)
    • ►  October (2)
    • ►  August (9)
    • ▼  June (13)
      • Explanation on Struts flow.
      • what is the use of reset() method in ActionForm?
      • The difference between MVC and MVC 2(MODEL 2) ?
      • What is AOP Aspect Oriented Programming ?
      • how to clone an object in Java? what is shallow co...
      • how to find the 2nd, 3rd ,4th ... nth highest sala...
      • what is the output of select * from table where 1=2?
      • select second highest salary from emp table
      • Explanation on Data Abstraction and Data Encapsula...
      • About Interface in Java
      • Explanation on Difference between TRUNCATE, DELETE...
      • how Class.forName() works exactly?
      • Problem facing with SQL Query, ORA-01425: escape c...