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
What is database white box testing and black box testing?
What is the difference between a procedure and a function?
What are commit, rollback, and savepoint?
What is sql profiler in oracle?
how to start mysql server? : Sql dba
Is delete faster than truncate?
Why do we need databases?
How do you know if a relationship is 2nf?
What is the difference between the conventional and direct path loader? : aql loader
How do I quit sql?
How does postgresql compare to oracle/db2/ms sql server/informix?
What is coalesce sql?
how can you create an empty table from an existing table? : Sql dba
What does the hierarchical profiler does?
Which is better join or inner query?