CREATE SEQUENCE [dbo].[CustomersSeq] AS INT START WITH 10001 INCREMENT BY 1 MINVALUE -1;
CREATE TABLE [dbo].[Customers] ( CustomerID INT DEFAULT (NEXT VALUE FOR [dbo].[CustomersSeq]) NOT NULL, CustomerName VARCHAR(100), );
INSERT INTO [dbo].[Customers] ([CustomerName]) VALUES ('Jerry'), ('Gorge') SELECT * FROM [dbo].[Customers]
Results
DELETE FROM [dbo].[Customers] WHERE CustomerName = 'Gorge'; INSERT INTO [dbo].[Customers] ([CustomerName]) VALUES ('George') SELECT * FROM [dbo].[Customers]
Read Articlehttps://develop.horje.com/learn/1434/reference