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 / rohan
select empno from emp where (sal,deptno) in ( select max
(sal),deptno from emp where deptno in (10,20) group by
deptno)
| Is This Answer Correct ? | 13 Yes | 6 No |
Post New Answer View All Answers
Which sql most popular?
Can we use view in stored procedure?
What does subquery mean in sql?
What is restrict in sql?
What is difference between function and trigger?
What is case function?
How many functions are there in sql?
how are mysql timestamps seen to a user? : Sql dba
Can we use joins in subquery?
how would you write a query to select all teams that won either 2, 4, 6 or 8 games? : Sql dba
Does inner join remove duplicates?
How do I pipe the output of one isql to another?
What is trigger price?
Suppose a student column has two columns, name and marks. How to get name and marks of the top three students.
What are inner outer left and right joins in sql?