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

Does inner join return duplicate rows?

705


Explain what is a field in a database and record in a database?

792


What is difference between my sql and sql?

723


Is there a 64 bit version of ssms?

678


How to display the records between two range in Oracle SQL Plus?

872






How is a PL/SQL code compiled?

873


Sql technical questions

1002


Could you please provide oca (oracle 10g) dumps for my certification ?

4784


Where do we use pl sql?

724


Table 1: col1 Timestamp ---------------- 01-mar-2012 11:12:46 Table 2: col2 Timestamp -------------------- 01-mar-2012 11:12:10 01-mar-2012 11:11:23 Write a query to display a row with table2 col2 value less than tabl1 col1 value. Maximum timestamp value previous to table1 col1 value. Display a result as: Col1 col2 ----- ----- 01-mar-2012 11:12:46 01-mar-2012 11:12:10

1899


what are the different functions in sorting an array? : Sql dba

766


Who developed sql?

758


what are the advantages of sql ? : Sql dba

740


When can we use the where clause and the having clause?

780


Can we insert data in view?

691