In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Post create sql - auto increment?

Hamder83
11 - Bolide

Hi 

I'm using this snippet of code:

ALTER TABLE UB_SalesAgreements
ALTER COLUMN ID bigint NOT NULL;

ALTER TABLE UB_SalesAgreements

ADD PRIMARY KEY (ID);

 

 

 

I want to add AUTO INCREMENT
https://www.w3schools.com/sql/sql_autoincrement.asp

I tried:

ALTER COLUMN ID bigint NOT NULL AUTO INCREMENT;
AND 

 

ALTER COLUMN ID bigint NOT NULL;

ALTER COLUMN ID bigint AUTO INCREMENT; 

but it does not work?

1 REPLY 1
Hamder83
11 - Bolide

Or like this maybe?

 

 

ALTER TABLE UB_SalesAgreements
ALTER COLUMN ID IDENTITY(1,1);

Labels
Top Solution Authors