INSERT INTO myTable (Product, ProductID) VALUES ('Book', (SELECT MAX(ProductId) +1 FROM myTable))
create TABLE ProductTable ( ProductID int primary key identity (990,1), --This will automatically Increment your value of ProductID starting from 990. Also Promary Key. ProductName varchar(100), -- Name of Product stored as Varchar );
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)