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
Is a secondary key the same as a foreign key?
What is cold data?
What is the difference between delete and truncate statement in sql?
How do I view a view in sql?
How do you explain an index?
What are the types of optimization?
what is 'mysqlcheck'? : Sql dba
What does the sign mean in sql?
What is the advantage of index in sql?
how to get help information from the server? : Sql dba
Can we join 3 tables in sql?
What are the events on which a database trigger can be based?
What is group function in sql?
What are basic techniques of indexing?
How to use boolean type in select statement?