Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: orace sql query
EdStevens wrote:
> On Jun 22, 3:45 pm, DA Morgan <damor..._at_psoug.org> wrote:
>> EdStevens wrote: >>> On Jun 22, 12:15 pm, sathishkes..._at_gmail.com wrote: >>>> i want to create table with primary key but with out index >>> How do you think Oracle enforces the PK? >> Not with an index. Indexes have nothing to do with primary key >> enforcement. Consider, for example, a deferred constraint which >> is built with a non-unique index. >> -- >> Daniel A. Morgan >> University of Washington >> damor..._at_x.washington.edu (replace x with u to respond) >> Puget Sound Oracle Users Groupwww.psoug.org
You can not have a primary key or unique constraint without an index. In that you are correct: Oracle won't allow it.
The point I was making was merely a clarification. The index is used to speed the search for values not to enforce the constraint. The description in the manuals/docs is misleading.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Tue Jun 26 2007 - 10:23:57 CDT