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 found sql?
How do you declare a user-defined exception?
What is a composite primary key?
What are the two parts of design view?
What is pl sql block structure?
What are the different types of tables in sql?
what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba
Can you have more than one trigger on a table?
What is sql key?
Is there a way to automate sql execution from the command-line, batch job or shell script?
When do we use triggers?
What is not null in sql?
How do I audit the sql sent to the server?
What are all types of user defined functions?
What is multiple columns?