使用SQL语句建立关系数据库模式及数据如下;
EMP:
EMPNO | ENAME | JOB | MGR | HIREDATE | SAL | COMM | DEPTNO |
---|---|---|---|---|---|---|---|
7369 | SMITH | CLERK | 7902 | 17-Dec-90 | 13750 | 20 | |
7499 | ALLEN | SALESMAN | 7698 | 20-FEB-89 | 19000 | 6400 | 30 |
7521 | WARD | SALESMAN | 7698 | 22-FEB-93 | 18500 | 4250 | 30 |
7566 | JONES | MANAGER | 7839 | 02-APR-89 | 26850 | 20 | |
7654 | MARTIN | SALESMAN | 7698 | 28-SEP-97 | 15675 | 3500 | 30 |
7698 | BLAKE | MANAGER | 7839 | 01-MAY-90 | 24000 | 30 | |
7782 | CLARK | MANAGER | 7839 | 09-JUN-88 | 27500 | 10 | |
7788 | SCOTT | ANALYST | 7566 | 19-APR-87 | 19500 | 20 | |
7839 | KING | PRESIDENT | 17-NOV-83 | 82500 | 10 | ||
7844 | TURNER | SALESMAN | 7698 | 08-SEP-92 | 18500 | 6250 | 30 |
7876 | ADAMS | CLERK | 7788 | 23-MAY-96 | 11900 | 20 | |
7900 | JAMES | CLERK | 7698 | 03-DEC-95 | 12500 | 30 | |
7902 | FORD | ANALYST | 7566 | 03-DEC-91 | 21500 | 20 | |
7934 | MILLER | CLERK | 7782 | 23-JAN-95 | 13250 | 10 | |
3258 | GREEN | SALESMAN | 4422 | 24-Jul-95 | 18500 | 2750 | 50 |
4422 | STEVENS | MANAGER | 7839 | 14-Jan-94 | 24750 | 50 | |
6548 | BARNES | CLERK | 4422 | 16-Jan-95 | 11950 | 50 |
DEPT:
DEPTNO | DNAME | LOC |
---|---|---|
10 | ACCOUNTING | LONDON |
20 | RESEARCH | PRESTON |
30 | SALES | LIVERPOOL |
40 | OPERATIONS | STAFFORD |
50 | MARKETING | LUTON |