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
Why use triggers in sql?
what does the t-sql command ident_incr does? : Transact sql
what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba
How to get help at the sql prompt?
Where is pl sql used?
How many functions are there in sql?
What is compilation error in pl sql?
explain the difference between delete , truncate and drop commands? : Sql dba
Explain what is a view?
What is cascade in sql?
How does stored procedure reduce network traffic?
When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?
What is the best sql course?
How do temporal tables work?
what is try_catch block in procedure