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 / kishore
select * from em where sal in (select max(sal) from em
where dno in (10,20) group by dno) and dno in (10,20)
where em = table name
dno = department number
sal = salary
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
How do I find duplicates in sql?
Is sqlite thread safe?
What does dml mean?
How do I create a sql script?
Can dml statements be used in pl/sql?
What is procedure and function in sql?
What is audit logout in sql profiler?
Is it mandatory for the primary key to be given a value when a new record is inserted?
Explain the types of joins in sql?
how do you login to mysql using unix shell? : Sql dba
What is a heap in sql?
How do I send sql query results to excel?
What is embedded sql with example?
What are three advantages to using sql?
What is constant in pl sql?