Thread: SQL
-
Hey all,
I am trying to create the Employee table and disable the foreign key constraint (the dept table is not created yet!). But it didn't work, did I use the DISABLE in the last line correctly? Please advise.
Create TABLE employee
(fname VARCHAR2(15) NOT NULL,
minit VARCHAR2(2),
lname VARCHAR2(15) NOT NULL,
ssn VARCHAR2(9) NOT NULL,
bdate DATE,
address VARCHAR2(30),
sex VARCHAR2(1),
salary NUMBER (10,2),
superssn VARCHAR2(9),
dno NUMBER(1) NOT NULL,
CONSTRAINT emp_ssn_pk PRIMARY KEY (SSN),
CONSTRAINT emp_superssn_fk FOREIGN KEY(superssn) REFERENCES dept(mgrssn) disable);
Thanks
RAY
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|