Hi,
I'm trying to place a variable as a identity seed. Is this possible? I can't seem to find an answer anywhere... Below is my code:
declare @max1 int
select @max1 = max(acid)+1 from cms_2a
alter table cms_3a add cwid int identity(@max1, 1)
It says that I have an error on "@max1". If I can't place a variable as a seed, how else can I resolve this issue?
Thank you in advance!
I'm trying to place a variable as a identity seed. Is this possible? I can't seem to find an answer anywhere... Below is my code:
declare @max1 int
select @max1 = max(acid)+1 from cms_2a
alter table cms_3a add cwid int identity(@max1, 1)
It says that I have an error on "@max1". If I can't place a variable as a seed, how else can I resolve this issue?
Thank you in advance!