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 / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to install mysql? : Sql dba

580


What does pl sql stand for?

658


what are all different types of collation sensitivity? : Sql dba

527


What is compute?

560


what is 'mysqlcheck'? : Sql dba

575






what are local and global variables and their differences? : Sql dba

542


Is there any restriction on the use of union in embedded sql?

681


Can we alter stored procedure?

545


What is triggering circuit?

597


What is a natural join?

518


What can I use instead of union in sql?

518


how to use myisamchk to check or repair myisam tables? : Sql dba

509


Can we edit a view in sql?

550


What is the syntax to add a record to a table?

577


What is synchronized subquery?

597