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
explain mysql aggregate functions. : Sql dba
What is the use of triggers?
Can we use joins in subquery?
How to generate a salary slip like jan 1000 1000 feb 1000 2000 ... dec 1000 12000
What are string functions in sql?
Can we use having without group by in sql?
How do you change a value in sql?
Why we use joins in sql?
GLOBAL TEMPORARY TABLE over Views in advantages insolving mutating error?
Does sql view stored data?
How can I see all tables in sql?
Explain the difference between triggers and constraints?
How to run sql statements through the web interface?
Which normal form is best?
when MSQL8.0 is in market