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 |
how do you count the duplicate records in a table
full outer join syntax
What is the Diff b/w Constraints and Trigeer
What is the purpose of design view?
What is user in sql?
25.67,-1 Trunc = 20 Round= 30 HOW????
How to create a menu in sqlplus or pl/sql?
What is record in pl sql?
How to convert lowercase letters to uppercase and uppercase letters to lowercase in a string. (ex, AbcdEfG should convert as aBCDeFg)
What is tuple in sql?
What is replication id?
What are the qualities of 2nf?
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)