Advanced Customization > Services and Infrastructure Customization > Persistence Management > Persistence Datastore Sequence Customization > Sample Code > Non-modeled Sample Scripts
  
Non-modeled Sample Scripts
Oracle
The following is a sample script for a partNumber sequence that begins with 1 and has an interval of 20.
exec WTPK.createSequence('partNumber', 1, 20)
SQL Server
The following is a sample script for a partNumber sequence that begins with 1 and has an interval of 20.
CREATE TABLE wt_sequence_partNumber (dummy
CHAR(1), value BIGINT IDENTITY(1,20))
go
CREATE PROCEDURE wt_get_next_sequence_partNumber @returnValue BIGINT OUTPUT
AS
INSERT wt_sequence_<MySequence> (dummy) VALUES ('x')
SELECT @returnValue = SCOPE_IDENTITY()
go