cancel
Showing results for 
Search instead for 
Did you mean: 
SAP Community Downtime Scheduled for This Weekend

HANA auto identity column

Former Member
1,407

Hi All,

Any help much appreciated , I have some 500 tables in a schema and all the 500 table has auto identity column , in some table auto identity column is the primary key as well but for other table their is no primary key but with identity column.

My requirement is to delete the auto identity on the tables ??

I searched many documents and google but did not see an option to delete auto identity, is their a way i can do that ?? other than drop and recreate the table without identity column ??

Thanks in Advance

Accepted Solutions (0)

Answers (2)

Answers (2)

eason_chen
Product and Topic Expert
Product and Topic Expert

Hi,

You could use following SQL to drop the column.
ALTER TABLE T DROP ("<column name>")

In case the column is primary key. You have to first drop the primary key and recreate it with other columns.
ALTER TABLE T DROP PRIMARY KEY

Best Regards,
Eason Chen

Former Member
0 Kudos

Thanks for the replying Eason , my requirement is to drop or disable only the auto identity feature in the column not to drop the whole column nor drop the primary key in the column .

Thanks

Former Member
0 Kudos

Many Thanks Eason

eason_chen
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Dilip,

The feature to modify identity column is not supported. You could refer to following guide.
https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.03/en-US/20d329a6751910149d5fdbc480...

The sequence defined for an IDENTITY column cannot be altered or reset after table creation.