Drop a primary
Drop a primary
От:
Martin Mueller <martinmueller@northwestern.edu>
Дата:
I created a primary key with the following commands
Add id serial
Add primary key (id)
I cannot figure out from the documentation how to drop that column.
Re: Drop a primary
От:
Ron <ronljohnsonjr@gmail.com>
Дата:
On 10/2/19 1:48 PM, Martin Mueller wrote:
Drop it just like you added it:
test=# alter table foobar add id serial;
ALTER TABLE
test=# alter table foobar add primary key(id);
ALTER TABLE
test=# alter table foobar drop id;
ALTER TABLE
I created a primary key with the following commands
Add id serial
Add primary key (id)
I cannot figure out from the documentation how to drop that column.
Drop it just like you added it:
test=# alter table foobar add id serial;
ALTER TABLE
test=# alter table foobar add primary key(id);
ALTER TABLE
test=# alter table foobar drop id;
ALTER TABLE
--
Angular momentum makes the world go 'round.
Angular momentum makes the world go 'round.