In SQL, one can set the identity property on a column to automatically generate sequential values when new records are inserted. One can use the IDENTITY keyword when creating a table.
How to set identity on in SQL?
For example, one can set the identity property on:
sql
CREATE TABLE ExampleTable (
ID INT PRIMARY KEY IDENTITY(1,1),
Name V/A/R/C/H/AR(50)
);
So, Name can have letters or numbers and can be up to 50 characters long. In the example, the ID column is designated as an identity column. The number will start at 1 and go up by 1 for each new record. Change the numbers in IDENTITY(seed, increment) to fit what one need.