consider a table which contain 4 columns,ename,eno,sal and
deptno, from this table i want to know ename who having
maximum salary in deptno 10 and 20.

Answer Posted / rashmi_raju

SELECT ename FROM emp WHERE sal =(SELECT MAX(sal) FROM emp
WHERE deptno=10)
UNION
(SELECT ename FROM emp WHERE sal =(SELECT MAX(sal) FROM emp
WHERE deptno=20))

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is write ahead logging in sql server?

564


how are mysql timestamps seen to a user? : Sql dba

568


what is the difference between blob and text? : Sql dba

533


What does pragma mean?

515


What version is sql?

559






i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this

1073


What is meant by cursor in sql?

553


What is the difference between a subquery and a join?

534


What is a sql*loader control file?

622


Does pl/sql support create command?

581


What is optimistic concurrency control? : Transact sql

553


What is the use of sqlerrd 3?

529


Is null operator in sql?

610


Why is sql*loader direct path so fast?

605


What are two statement types in sql?

544