phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Riesland, Zack" <Zack.Riesl...@sensus.com>
Subject RE: How to adjust primary key on existing table
Date Tue, 14 Jul 2015 17:14:52 GMT
Thanks James,

To clarify: the column already exists on the table, but I want to add it to the primary key.

Is that what your example accomplishes?

From: James Taylor [mailto:jamestaylor@apache.org]
Sent: Tuesday, July 14, 2015 1:11 PM
To: user
Subject: Re: How to adjust primary key on existing table

ALTER TABLE t ADD my_new_col VARCHAR PRIMARY KEY

The new column must be nullable and the last existing PK column cannot be nullable and fixed
width (or varbinary or array).

On Tue, Jul 14, 2015 at 10:01 AM, Riesland, Zack <Zack.Riesland@sensus.com<mailto:Zack.Riesland@sensus.com>>
wrote:
This is probably a lame question, but can anyone point me in the right direction for CHANGING
and EXISTING primary key on a table?

I want to add a column.

Is it possible to do that without dropping the table?

Thanks!



Mime
View raw message