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 / partha
Select emplid, sal from (select emplid, sal from
emp_sal_tbl where deptid = 10 order by sal desc) a where
rownum < 2
union
Select emplid, sal from (select emplid, sal from
emp_sal_tbl where deptid = 20 order by sal desc) a where
rownum < 2
| Is This Answer Correct ? | 0 Yes | 4 No |
Post New Answer View All Answers
What is sql in java?
Is sql scripting language?
What is cte sql?
how to delete duplicate rows from a join tables(I have three tables on that join) how do you know which join is need to be used? The select statement I have is: SELECT gc_skill_type.skill_type, gc_area_tec.area, gc_technology.technology, gc_technology.id_technology, gc_area_tec.id_area_tec FROM gc_skill_type, gc_area_tec, gc_technology WHERE gc_area_tec.id_skill_type (+) = gc_skill_type.id_skill_type AND gc_technology.id_area_tec (+) = gc_area_tec.id_area_tec order by gc_skill_type.skill_type asc, gc_area_tec.area asc, gc_technology.technology asc
What is the difference between local and global temporary table?
What is the current version of sql?
what is 'trigger' in sql? : Sql dba
what is uncommittable transactions? : Transact sql
What is a natural join sql?
Does sql*plus also have a pl/sql engine?
How do I add a database to sql?
Which language is used in sql?
what is row? : Sql dba
What is sql rowcount?
what is the difference between union and union all? : Sql dba