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
How do you update sql?
What are % type and % rowtype?
Show the two pl/sql cursor exceptions.
Can we rollback truncate?
What is difference between db2 and sql?
what is sql in mysql? : Sql dba
Can we write ddl statements in functions?
What are sql functions? Describe the different types of sql functions?
What is difference between stored procedures and application procedures?
What are tables in sql?
Can a procedure in a package be overloaded?
Why use subqueries instead of joins?
Which language is used in sql?
What are transaction and its controls?
What does joining a thread mean?