I have one table :EID,Depid,ename,sal
I want to have max(sal) in each department.

Answer Posted / venkat

select * from emp_test where sal IN(select max(sal) from
emp_test group by deptno)

Is This Answer Correct ?    1 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you bind variables in oracle?

638


What is program global area (pga) in oracle?

685


What are the differences between primary key and unique key?

594


What is a table in oracle?

624


What is data block in Oracle?

719






How can you merge two tables in oracle?

656


Can we connect to ORACLE db using Windows Authentication?

799


Use of an integrity constraint is better to validate data. Explain

632


Can select statements be used on views in oracle?

671


How to return top 5 rows in oracle?

635


How do you store pictures in a database?

657


What are the database administrators utilities available?

662


What is a system tablespace?

682


Explain about your project and its relation to the current job position you are applying to?

638


What are ddl statements in oracle?

669