Brian wrote:
> Is there a difference in doing:
>
> foo int PRIMARY KEY
>
> and
>
> CREATE INDEX idx1 on table (foo);
Yes,
create table bar (foo int PRIMARY KEY);
is the same as
create table bar (foo int NOT NULL); CREATE UNIQUE INDEX bar_pkey on
table bar(foo);
The first is easier to type,
the second is preferable (faster) if you will initially do a lot of
inserts, like:
create table...
loads of inserts...
create unique index...