cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Datastore Sequence in SQLServer

VasiliyRepecki
12-Amethyst

Datastore Sequence in SQLServer

Hi.

I newbie in SQL.

I created sequence as described in "Persistence Datastore Sequence Customization" chapter of customization guide:

CREATE TABLE wt_sequence_<MySequence> (dummy CHAR(1),

value BIGINT IDENTITY(<MySequenceSeed>,<MySequenceIncrement>))

go

CREATE PROCEDURE wt_get_next_sequence_<MySequence> @returnValue BIGINT OUTPUT

AS

INSERT wt_sequence_<MySequence> (dummy) VALUES ('x')

SELECT @returnValue = SCOPE_IDENTITY()

go

For testing period i set MySequenceSeed = 1.

How can i later change MySequenceSeed ?

Thanks.

ACCEPTED SOLUTION

Accepted Solutions

Next code changes sequence start = 20:

SET IDENTITY_INSERT wt_sequence_<MySequence> ON;

GO

INSERT wt_sequence_<MySequence> (dummy, value) VALUES ('x', 19)

View solution in original post

1 REPLY 1

Next code changes sequence start = 20:

SET IDENTITY_INSERT wt_sequence_<MySequence> ON;

GO

INSERT wt_sequence_<MySequence> (dummy, value) VALUES ('x', 19)

Announcements


Top Tags