Issue while adding identity to a column in Alter table
I’m facing a problem with auto-increment/identity feature in Teradata table. I already had a table in solution without identity feature, but as the requirements changed, I have to modify/alter that column from integer data type to integer data type with identity feature, but somehow it’s not allowing me to do that. I’m not sure whether Teradata support it or not.
I had tried different approaches suggested by people over the internet.
CREATE TABLE TEST ( TEST_ID INTEGER NOT NULL, TEST_NAME VARCHAR(32) ) ;
alter table TEST add TEST_ID INTEGER GENERATED BY DEFAULT AS IDENTITY(START WITH 1 INCREMENT BY 1);
Error: ALTER TABLE Failed. 3706: Syntax error: Cannot add new Identity Column option.