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 / gautam
select ename,sal from emp
where sal in (select max(sal) from emp group by deptno)
and deptno in (10,20)
Gautam
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
Why should I use postgresql?
How to write a single statement that concatenates the words ?hello? And ?world? And assign it in a variable named greeting?
Explian rowid, rownum? What are the psoducolumns we have?
Explain the working of primary key?
Is join same as left join?
define sql update statement ? : Sql dba
What are conditional predicates?
how would you enter characters as hex numbers? : Sql dba
How do sql databases work?
How would you reference column values before and after you have inserted and deleted triggers?
What is a memo field?
How does sql profiler work?
Does sql require a server?
What is server name sql?
How do I create a memory optimized filegroup?