SQL assignment Answers-3
SQL assignment Answers-3
QUESTIONS ON OPERATORS
11) LIST ALL THE SALESMEN IN DEPT 30 WITH SAL MORE THAN 2450
select *
from emp
where job='SALESMAN'
and deptno=30
and sal>2450;
20) LIST THE EMPLOYEES WHO ARE NOT WORKING AS MANAGERS AND
CLERKS IN DEPT 10 AND 20 WITH A SALARY IN THE RANGE OF 1000 TO
3000
Select *
from emp
where job NOT IN ('MANAGER','CLERK')
and deptno IN(10,20)
and sal between 1000 and 3000;
21) LIST THE EMPLOYEES WHOSE SALARY NOT IN THE RANGE OF 1000
TO 2000 AND WORKING IN DEPT 10,20 OR 30 EXCEPT ALL SALESMEN
select *
from emp
where sal not between '1000' and '2000'
and deptno in (10,20,30)
and job!='SALESMAN';
Siddhesh Balghare QSpiders Wakad