An employee table, with the columns id, name, sal and dob.
Query to select emp names of all highest salaries(there are
4-5 people having the same salary which happens to be the
highest).









Answer Posted / kalyan

select name,max(sal) from emp group by name

Is This Answer Correct ?    6 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

List out the differences between global and local temp tables in sql server?

569


Can we check locks in database? If so, how can we do this lock check?

523


Can you create a logon trigger in sql server 2005 express edition?

569


What is the web service used for reporting services?

98


How do you create type- insensitive operator?

565






How do you rename a table in sql server?

490


What are indexes in ms sql server?

551


Sql server reporting services vs. Crystal reports.

96


What sql server means?

555


Can two tables share the same primary key?

500


What is transaction server explicit transaction?

540


What is the difference between a clustered index and a non-clustered index?

528


What is an entity-relationship diagram (erd)?

586


What is amo? : sql server analysis services, ssas

664


How to create new databases with "create database" statements?

565