On 10/30/20 8:30 AM, Rich Shepard wrote:
A table has a unique constraint on a column that needs removing. Reading the
postgres-12.x docs for alter table it appears the correct syntax is:

alter table locations drop constraint unique;

It should be:

alter table locations drop constraint 'constraint_name';

Where you can find 'constraint_name' from:

\d locations


but this is wrong.

Trying 'alter table locations alter column loc_nbr drop constraint unique;' also
failed.

What's the proper syntax to drop the unique constraint on a table column?

TIA,

Rich





--
Adrian Klaver
adrian.kla...@aklaver.com


Reply via email to