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
When sql appeared?
What are aggregate and scalar functions?
What is data type in database?
what are all the common sql function? : Sql dba
how to extract a unit value from a date and time? : Sql dba
Explain normalization and what are the advantages of it?
What is rtm in testing?
Is ms sql is free?
what are the types of subquery? : Sql dba
What is composite primary key in sql?
How do you create a db file?
How do you create a unique index?
describe mysql connection using mysql binary. : Sql dba
What are the properties of a transaction?
Can you inner join the same table?