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?
select ename from table where sal=(select max(sal) from
table) and deptno in (10,20);
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!