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.
Answers were Sorted based on User's Feedback
Answer / sonal
select * from (select ename, deptno,sal
from emp where deptno in(10 , 20)
order by sal desc)
where rownum < =1
Is This Answer Correct ? | 2 Yes | 4 No |
Answer / 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 |
Answer / sumesh s.g
select Name from TBL_Employee
where Salary in(
select max(Salary) from dbo.TBL_Employee
group by DepID
having DepID in(10,20))
--Happy Codding--
Is This Answer Correct ? | 0 Yes | 5 No |
Answer / nancy
Select ename from table where dept_no in ('10','20') group
by dpt_no
Is This Answer Correct ? | 4 Yes | 27 No |
What is the file extension for sql database?
What is a join?Explain the different types of joins?
6 Answers Bank Of India, CitiGroup, Google, ICICI, Saama Tech, SkyTech, TCS,
How do u count no of rows in a table?
What are different types of sql?
What is sqlservr exe?
What found sql?
What is replication id?
Explain the structure of pl/sql in brief.
what is difference between stored procedures and application procedures,stored function and application function?
how can I make a script that can be bi-language (supports english, german)? : Sql dba
what is sql server agent? : Sql dba
What is the difference between explicit and implicit cursors in oracle?