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

Select emp_name from emp where sal =(Select Max(sal) from
emp where deptno=10) and deptno=10 union
Select emp_name from emp where sal =(Select Max(sal) from
emp where deptno=20)and deptno=20

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you have a foreign key without a primary key?

512


What is the difference between nested table and varray?

525


List out the acid properties and explain?

566


Explain the commit statement.

613


List different type of expressions with the example.

551






how to get a list of all tables in a database? : Sql dba

513


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

558


how to get @@error and @@rowcount at the same time? : Sql dba

531


What are tables and fields?

595


Explain what is a view?

600


What is the maximum number of triggers, you can apply on a single table?

547


what is the difference between primary key and unique key? : Sql dba

533


what is csv? : Sql dba

578


which tcp/ip port does sql server run on? : Sql dba

519


Why cannot I use bind variables in ddl/scl statements in dynamic sql?

671