posted 18 years ago
In your case it is prefarable to create the tables like :
Create table Dept(
Dept_id number,
Dept_name varchar2(20),
CONSTRAINT DEPT_DEPTID_PK PRIMARY KEY (DEPT_ID));
Create table Student(
stud_Id number,
Stud_Name Varchar2(50),
...
Dept_id Number,
CONSTRAINT STUDENT_STUDID_PK PRIMARY KEY (STUD_ID),
CONSTRAINT STUDENT_DEPTID_FK FOREIGN KEY (DEPT_ID)REFERENCES Dept(Dept_id)
);