Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: foreign keys between 2 tables - newbie question
Andy Hassall wrote:
> SQL> create table employee (> 5 );
> 2 emp_id number not null,
> 3 dept_id number not null,
> 4 constraint employee_pk primary key (emp_id)
Andy ... please don't take this as a criticism, that is not the intent, but from an education standpoint I would never teach someone to create a constraint in the way you have demonstrated here.
What tablespace ist he index placed in?
With what name (assuming not 10g)?
With what storage parameters?
etc.
And then for maintenance purposes the DDL does not exist to recreate it if it is dropped. That is why I always teach CREATE TABLE followed by ALTER TABLE.
-- Daniel A. Morgan http://www.psoug.org damorgan_at_x.washington.edu (replace x with u to respond)Received on Wed May 18 2005 - 17:29:40 CDT