On 30/10/2020 15:30, 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;
>
> 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
>
>
>
You need
alter table locations drop constraint <constraint name>;
Cheers, Chris Sterritt