New to Orcale
459355Oct 10 2005 — edited Oct 12 2005Hi Everyone,
I am new to oracle and I have a small problem and was stucked for days.
I am creating 2 tables each has a foreign key referencing the other table. However, whenever I try to create the first table, sql plus complaint that the other table did not exist and refused to create the table.
create table EMPLOYEE (
......
SSN varchar(10) not null;
.....
foreign key (DNO) references DEPARTMENT(DNUMBER)
);
ERROR at line 13:
ORA-00942: table or view does not exist
create table DEPARTMENT (
......
DNO varchar(5) not null;
......
foreign key(MGRSSN) references EMPLOYEE(SSN)
);
Would any one give me a hint ?
Thanks in advance!
Alex