Write a query to get all details of employee who has maximum
salary from employee table

Answer Posted / sureshramsing

select * from emp where (empno,1)=(select * from(select empno,row_number() over(order by sal desc) rn from emp) where rn=1);

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to list all user defined functions in the current database?

510


List the different types of collation sensitivities in sql server?

520


how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A

1207


What are the filtered indexes?

594


do views contain data ?

574






What is log shipping? Can we do logshipping with SQL Server 7.0 ?

565


What is raid and what are different types of raid levels?

584


What is a rownum?

493


What is Fragmentation and Defragmentation? For 32GB Table,How can we do the fragmentation?

3743


How to update a field in SQL after ALTERING a row?

682


What is mean by candidate key?

529


What action plan is preferred if sql server is not responding?

527


What is an execution plan? How would you view the execution plan?

539


What number aggregate functions are accessible there in sql?

578


What are the lambda triggers?

478