-1

In vertica I want to change the datatype of the identity column. For example

CREATE TABLE t1(x IDENTITY(1) ,y INT)

Is there a way to change the identity column incremental value from 1 to say 10000.

I create the above table now I increment the identity column x IDENTITY(1) to x IDENTITY(10000)

I tried below sql but it does not work

alter table t1  alter column x SET DATA TYPE IDENTITY  ( 10000 );
Kermit
  • 33,827
  • 13
  • 85
  • 121
abdel
  • 1

2 Answers2

0

From the documentation:

You cannot change the value of an IDENTITY column once the table exists.

The available parameters for IDENTITY are:

IDENTITY [ ( cache ) | 
( start, increment[, cache ] ) ]
Kermit
  • 33,827
  • 13
  • 85
  • 121
0

You'd better "create" your table again with new identity properties and after that copy data from last table to new one.

Ganj Khani
  • 1,229
  • 15
  • 20