Albe Laurenz wrote:
Richard Huxton wrote:
What'd be the syntax to create a primary key on an already build table?
ALTER TABLE my_table ADD PRIMARY CONSTRAINT (existing_column);

I'm sure it's just a typo, but that is wrong.
It is not ADD PRIMARY CONSTRAINT, but ADD PRIMARY KEY.

It is indeed a typo. Thanks Albe.

Particularly irritating as I'd bothered give a link to the right manual page too...

--
  Richard Huxton
  Archonet Ltd

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to