Re: What is the use of a primary key?
Date: Fri, 06 Dec 2002 10:40:26 +0100
Message-ID: <3DF0708A.81D66DC4_at_hp.com>
Hi Lauri,
You wrote:
>
> >
> >
> >David Cressey wrote:
> >
> >
> >
> >>In fact, in Oracle, when you declare a PRIMARY KEY, you get an index on
> >>that key, like it or not.
> >>
> >>
> >
> >Seems odd that you'd have a quibble with this (and it's not
> >just limited to Oracle). Since a primary key must be unique,
> >how else would you want to enforce its uniqueness?
> >
>
> You might want to give properties (other than default) to the index, our
> you
> might want to set the order of some columns to descending.
>
> Now you have to first drop the system generated index and then create a
> new one.
At least part of what you want to achieve (storage parameters) can be done at index (and constraint) creation time by means of the keyword 'USING', after which you can specify a number of index specifics. You couldn't set the order to be descending, but frankly I wouldn't see a lot of use for that (index is supposed to be symmetric, isn't it?).
Regards,
Ruud de Koter.
-- -------------------------------------------------------------------------------------- Ruud de Koter HP OpenView Software Business Unit Senior Software Engineer IT Service Management Operation Telephone: +31 (20) 514 15 89 Van Diemenstraat 200 Telefax : +31 (20) 514 15 90 PO Box 831 Telnet : 547 - 1589 1000 AV Amsterdam, the Netherlands Email : ruud_dekoter_at_hp.com internet: http://www.openview.hp.com/products/servicedesk intranet: http://ovweb.bbn.hp.com/itservicemanager --------------------------------------------------------------------------------------Received on Fri Dec 06 2002 - 10:40:26 CET