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

Write the command to remove all players named sachin from the players table.

750


What are views in sql?

555


Which tcp/ip port does sql server run?

542


How is pl sql different from sql?

557


What is sqlservr exe?

484






tell us something about heap tables. : Sql dba

611


What is the basic structure of an sql?

584


how can we transpose a table using sql (changing rows to column or vice-versa) ? : Sql dba

519


How delete all data from all tables in sql?

546


What is bind variable in pl sql?

540


How are functions and procedures called in PL/SQL?

597


What is sql partition?

564


What is cursor and its types?

570


Does a join table need a primary key?

541


What is before trigger?

564