Write a query to find second highest salary of an employee.
Answer Posted / sathish p
select e1.* from (select ename,sal,rank()
over(order by sal) rank from emp) e1
where e1.rank=2;
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What are the different dcl commands in sql?
What is a boolean in sql?
What action do you have to perform before retrieving data from the next result set of a stored procedure ?
What is a sql select statement?
What is data control language?
Define SQL and state the differences between SQL and other conventional programming Languages?
What is having clause in sql?
What is pl sql package?
What's the difference between a primary key and a clustered index?
what is rollback? : Sql dba
What is the non-clustered index in sql?
What type of join is sql join?
What is the difference between joins?
Write a query to find the names of users that begin with "um" in sql?
What is sql character function?