add column in ordinal positions

Moderator: NorbertKrupa

Post Reply
User avatar
nnani
Master
Master
Posts: 302
Joined: Fri Apr 13, 2012 6:28 am
Contact:

add column in ordinal positions

Post by nnani » Mon Apr 21, 2014 6:05 am

Hello All,

Can we a add a column into an existing table at a specific ordinal position.

I can see the ordinal postions of columns in the columns table, If I want to add a column in middle of ordinal positions, Can we do it.
Is there some different alter table statement.

I want to do it using Alter table statement.

Thanks
nnani........
Long way to go

You can check out my blogs at vertica-howto

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: add column in ordinal positions

Post by JimKnicely » Tue Apr 22, 2014 3:12 pm

Hi,

I believe you have to create a temp table and projections with your new column, copy data into it for the original table, drop your old table and rename the new table to the old table.
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “Vertica SQL”