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
How do you optimize a stored procedure query?
what is a record in a database ? : Sql dba
What does plv msg allows you to do?
How much does sqlite cost?
Is subquery faster than join?
How do I add a database to sql?
Can you sum a count in sql?
What are the indexing methods?
What is date functions?
what is primary key? : Sql dba
Does sql require a server?
How to place comments in pl/sql?
How do sql triggers work?
how do you know the version of your mysql server? : Sql dba
How to use sql statements in pl/sql?