how to find the second highest salary from emp table?
Answer Posted / hari chaudhary
All My friend use this query then good result of your sql
database find in second or Third last data find.....
Select distinct(salary) From employee E1 Where
(n-1) = (Select Count(Distinct(E2.salary)) From employee E2
Where E2.salary > E1.salary)
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the difference between join and natural join?
What is difference between stored procedures and application procedures?
what is the difference between clustered and non clustered index in sql? : Sql dba
what is the stuff function and how does it differ from the replace function? : Sql dba
What is an example of translating a date into julian format?
What is the difference among union, minus and intersect?
What does varchar include?
What is the difference between execution of triggers and stored procedures?
what are rollup and cube in t-sql? : Transact sql
What is the maximum rows in csv?
What are the advantages of stored procedure?
Is record in oracle pl sql?
Can we insert data into view?
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
Can we use commit inside a trigger?