Xref: alice comp.databases.oracle.server:36865
Path: alice!news-feed.fnsi.net!netnews.com!howland.erols.net!wn3feed!worldnet.att.net!135.173.83.225!attworldnet!newsadm
From: gennick@worldnet.att.net (Jonathan Gennick)
Newsgroups: comp.databases.oracle.server
Subject: Re: ORA-00001 when populating table
Date: 2 Jan 1999 00:43:41 GMT
Organization: AT&T WorldNet Services
Lines: 42
Message-ID: <369365a2.13331824@netnews.worldnet.att.net>
References: <76g1vq$ooo$1@nnrp1.dejanews.com>
Reply-To: gennick@worldnet.att.net
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Newsreader: Forte Agent 1.5/32.452

On Thu, 31 Dec 1998 14:33:29 GMT, grndvu@ids.net wrote:

>I am stepping through a 3rd party how-to book on Oracle8.  The book calls for
>creating an ORDER_DETAILS table in Oracle8 Navigator with a NO DEFAULT, NOT
>NULL, NOT UNIQUE ORDER_ID primary key field.  

It is not possible to have a NOT UNIQUE primary key. Primary
keys must be unique. That's inherent in the definition.
Either there is a mistake in the book, or your are
misinterpreting what it is asking you to do. 

>The book then calls for
>populating the table with records, several of which have the same ORDER_ID
>number.

If the table name is ORDER_DETAIL, I would expect the
primary key to consist of two fields. One would be the
ORDER_ID, and the other would be some sort of sequence
number. Is it possible that you are defining the primary key
incorrectly? 

I don't know what book you are reading, but here is what I
would expect to see based on what you said in yoru note:
	
	create table order_details (
		order_id		number,
		line_item_no	number,
		other fields go here,
		constraint pk_order_details 
			primary key (order_id, line_item_no)
		);

Multiple records could have the same order_id, but the
combination of order_id and line_item_no would have to be
unique.

Does this help you at all? What book is it that you are
reading?

Jonathan


