Your database may already have the Scott/tiger schema. Classic installation usually includes this mode, but does not require the database to have this component. The Scott example mode can be installed under any database account. Using the Scott account has no special significance. If you are happy, you can also install the EMP/DEPT table directly under your own database account.
The following is the actual operation process.
1. Create a new user oracledba
Sqlplus "sys/sys as sysdba" Grant connect to oracledba; commit; Alter user oracledba quota unlimited on users; commit;
2. Execute the table creation statement
@ F: \ oracle \ ora92 \ sqlplus \ demo \ demobld. SQL
3. create constraints
Alter table emp add constraint emp_pk primary key (empno); alter table dept add constraint dept_pk primary key (deptno); alter table emp add constraint emp_fk_dept foreign key (deptno) References dept; alter table emp add constraint emp_fk_emp foreign key (MGR) References EMP;
4. To delete the Scott/Tigger database table, run
@ F: \ oracle \ ora92 \ sqlplus \ demo \ demodrop. SQL