Académique Documents
Professionnel Documents
Culture Documents
Page 2 of 3
b. Find the how many different Job profile are there in Employee table ?
1
c. Find out how many people were given commision ? ( Count function does n't include null as
it counts)
1
d.
e.
f.
5.2 Select records from two tables depending condition suppose where deptno of from both emp and dept
mathes
1
?
Select e.ename, d.deptno,e.sal from emp e,dept d where e.deptno=d.deptn
o;
6.2 Select records from emp and dept where both deptno matches
1
7.2
1
7.3
1
8.2
1
8.3
1
9.2
1
13.2
1
13.3
1
13.4
1
13.5
1
SELECT * FROM emp WHERE comm IS NOT NULL AND sal >2000 AND deptno>20;
SELECT * FROM emp WHERE sal>2000 AND deptno>20 AND ename NOT LIKE(A%)
15.2
1
15.3
1
?
SELECT * FROM emp WHERE deptno<20 AND comm IS NOT NULL OR sal IN{1000,20
00,300
1
2
16.2
17.2
1
17.3
1
Pages:
1 (/database/sql-tutorial/6-select-query?limit=1&limitstart=0)
3 (/database/sql-tutorial/6-select-query?limit=1&start=2)
Prev (/database/sql-tutorial/7-complex-queries-in-sql)