1. SELECT ename,sal,comm FROM emp
where ename like 'A%'
UNION
SELECT ename,sal,comm FROM emp
where ename like 'E%'
2. SELECT ename,sal,comm FROM emp
where ename like 'A%'
UNION ALL
SELECT ename,sal,comm FROM emp
where ename like 'A%'
3. SELECT ename,sal,comm FROM emp
where ename like 'E%'
MINUS
SELECT ename,sal,comm FROM emp
where ename like 'E%'
AND Comm IS NULL
4. SELECT ename,sal,comm FROM emp
where ename like 'A%'
INTERSECTION
SELECT ename,sal,comm FROM emp
where ename like 'A%'
and sal < 2000
where ename like 'A%'
UNION
SELECT ename,sal,comm FROM emp
where ename like 'E%'
2. SELECT ename,sal,comm FROM emp
where ename like 'A%'
UNION ALL
SELECT ename,sal,comm FROM emp
where ename like 'A%'
3. SELECT ename,sal,comm FROM emp
where ename like 'E%'
MINUS
SELECT ename,sal,comm FROM emp
where ename like 'E%'
AND Comm IS NULL
4. SELECT ename,sal,comm FROM emp
where ename like 'A%'
INTERSECTION
SELECT ename,sal,comm FROM emp
where ename like 'A%'
and sal < 2000
No comments:
Post a Comment