List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 5 2002 11:09pm
Subject:Re: Difference between Unique Index and Primary Key?
View as plain text  
>Here are a few easy philosophical questions for a change:
>
>1) For performance or storage benefits, is there a difference between a
>Unique Index and Primary Key?

There can be only one primary key.  There can be multiple unique indexes.

Primary keys cannot contain NULL values.  Unique indexes can allow NULL
values (and in fact, NULL is the one value that can occur multiple
times in a unique index).

>
>2) Is there a reason why I should use Primary Key instead of a Unique Index?
>
>3) Why isn't there a syntax for "create primary index index_name on
>table_name (fieldlist)" ? I know a primary key can be added with "Alter
>table", but if I'm defining indexes for a table, it would look a lot better
>in the script if I was using the same syntax.
>
>TIA
>
>Brent
>
>sql, query

Thread
Difference between Unique Index and Primary Key?BD6 Apr
  • Re: Difference between Unique Index and Primary Key?Paul DuBois6 Apr
    • Re: Difference between Unique Index and Primary Key?BD6 Apr
      • Re: Difference between Unique Index and Primary Key?Paul DuBois6 Apr