โ05-04-2022 05:00 AM
How can we alter table with auto increment column for a delta table
I have tried this but not working:
ALTER TABLE dbgtpTest.student ADD COLUMN Student_Id identity(100,1)
any Suggestions will be helpful
โ05-07-2022 04:11 AM
@Rakesh Reddy Badamโ , For ALTER ... ADD COLUMN in doc is only SYNC IDENTITY.
If you want to add an identity column to the existing table just create a new table with an identity column and then copy the data.
โ05-05-2022 11:28 PM
@Rakesh Reddy Badamโ , I am not sure if that is supported. I only find references to creating an ID column with the CREATE TABLE statement.
โ05-07-2022 04:11 AM
@Rakesh Reddy Badamโ , For ALTER ... ADD COLUMN in doc is only SYNC IDENTITY.
If you want to add an identity column to the existing table just create a new table with an identity column and then copy the data.
โ05-12-2022 08:35 AM
Hi @Rakesh Reddy Badamโ , Just a friendly follow-up. Do you still need help, or @Hubert Dudek (Customer) and @Werner Stinckensโ 's response help you to find the solution? Please let us know.
โ06-02-2022 03:57 AM
Hi @Bittu6084 (Customer)โ , Just a friendly follow-up. Do you still need help?
โ06-21-2022 08:13 PM
Hi, I have the same concern. What's the best way to achieve this?
โ07-07-2022 04:27 AM
Hi @Peiran Quanโ, This option is only supported for identity columns on Delta Lake tables.
Please read the article here.
Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโt want to miss the chance to attend and share knowledge.
If there isnโt a group near you, start one and help create a community that brings people together.
Request a New Group