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 / gautam
select ename,sal from emp
where sal in (select max(sal) from emp group by deptno)
and deptno in (10,20)
Gautam
| Is This Answer Correct ? | 3 Yes | 4 No |
Post New Answer View All Answers
Is sql better than access?
What are crud methods?
Why we use pl sql?
What are the different ddl commands in sql?
How to add new employee details in an employee_details table with the following details
What is error ora-12154: tns:could not resolve the connect identifier specified?
Which is better trigger or stored procedure?
What is a field in a database?
what happens when the column is set to auto increment and you reach the maximum value for that table? : Sql dba
What is pivot in sql?
Why do we need cursor in pl sql?
how to load data files into tables with 'mysqlimport'? : Sql dba
Which join is like inner join?
How can we optimize a sql query?
Can we use view in stored procedure?