how could i change i initial value of NEWSEQUENTIALID() for sqlserver

373 Views Asked by At

enter image description herei was using uniqueidentifier colunm in my db and default value was newid() i cahnge it to NEWSEQUENTIALID() how could i change the start value of it to increasse the last one

1

There are 1 best solutions below

2
Kannan Kandasamy On

You cannot set initial value for newsequentialid(), See below example

create table t3 (id uniqueidentifier default newsequentialid(), idnum int)

insert into t3(id,idnum) values (newid(),10)
insert into t3(idnum) values (11),(12)

select * from t3

Even if you set different uniqueidentifier it will not continue from that.