It doesn't appear that adding the constraint is keeping me from creating the table. If I remove the line: marathon_type VARCHAR2(100) REFERENCES marathon_login(marathon_type), it creates the table fine. Could it have to do with it being defined varchar2(100) with incorrect syntax? I dunno. I'm really at a loss.
>I usually do them in two steps - first create table with pk fields being >non-null > >create table marathon_login ( > marathon_id NUMBER Not Null, >marathon_date_added date, > marathon_fname VARCHAR2(100), >marathon_lname VARCHAR2(100), >marathon_email VARCHAR2(100), >marathon_type VARCHAR2(100) >) > >Then... > >ALTER TABLE marathon_login > ADD CONSTRAINT pk_marathon_login PRIMARY KEY (marathon_id) > >ALTER TABLE marathon_entries > ADD CONSTRAINT fk_marathon_entries FOREIGN KEY (marathon_id) > REFERENCES marathon_login(marathon_id) > > >One of the benefits of doing it this way is giving explicit names to your >constraints. If you don't name them, Oracle will give them horrificly >un-identifiable names. Then, if you ever want to disable them without a gui, >you're sort of screwed. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:184289 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

