Re: NON-UNIQUE INDEX in CREATE TABLE ?

From: Michel Lalonde <michel.lalonde_at_sit.ulaval.ca>
Date: 1995/08/10
Message-ID: <michel.lalonde.44.000903F5_at_sit.ulaval.ca>#1/1


In article <301901025wnr_at_unisol.demon.co.uk> "D:WINSOCKKA9QSPOOLMAIL" <mark_at_unisol.demon.co.uk> writes:
>From: "D:WINSOCKKA9QSPOOLMAIL" <mark_at_unisol.demon.co.uk>
>Subject: NON-UNIQUE INDEX in CREATE TABLE ?
>Date: Wed, 09 Aug 1995 17:09:27 GMT
 

>I would like to define a non-unique index in the table creation ddl.
>This would encapsulate actions relating to the table in one place
>making it easier to maintain.
 

>Can it be done and if so how ?
 

>TIA,
 
>Mark :)
>-- Mark Pritchett
>Unisol Ltd
>West Midlands
>United Kingdom
>B76 1GJ

The only indexes that can be created with the CREATE TABLE command are those associated with the primary key and the unique constraints. To create a non unique index, you must use a seperate CREATE INDEX command.

By the way, you will NEVER be able to encapsulate actions relating to one table if you have dependant tables, not even if you keep a script for each table. The problem is that when you have to drop/create a table you have to recreate the dependant foreign keys and not only those of the actuel table.

Michel Lalonde. Received on Thu Aug 10 1995 - 00:00:00 CEST

Original text of this message