Write a query to find second highest salary of an employee.
Answer Posted / gvmahesh
I write the query for this question using OLAP functions.
select e1.* from (select ename,sal,rank()
over(order by sal desc) rank from emp) e1
where e1.rank=2;
| Is This Answer Correct ? | 5 Yes | 1 No |
Post New Answer View All Answers
how to create a test table in your mysql server? : Sql dba
Can a table have no primary key?
What is difference between procedure and trigger?
What is a relationship and what are they?
Explain what is a database?
What is db journal file?
Enlist the advantages of sql.
What is a unique constraint?
What is sqlca in db2?
What is lexical units in pl sql?
How do I sort a table in sql?
If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????
What are string functions in sql?
What are the different types of database management systems?
what are date and time intervals? : Sql dba