Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: foreign keys between 2 tables - newbie question

Re: foreign keys between 2 tables - newbie question

From: DA Morgan <damorgan_at_psoug.org>
Date: Wed, 18 May 2005 15:29:40 -0700
Message-ID: <1116455121.876590@yasure>


Andy Hassall wrote:

> SQL> create table employee (

> 2 emp_id number not null,
> 3 dept_id number not null,
> 4 constraint employee_pk primary key (emp_id)
> 5 );

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US