CREATE TABLE table_name (
id INT NOT NULL IDENTITY(1, 1),
name NVARCHAR (100) NULL,
school NVARCHAR (100) NULL,
PRIMARY KEY (ID)
);
CREATE TABLE [dbo].[MY_TABLE] (
[ID] INT NOT NULL IDENTITY(1, 1),
[NAME] NVARCHAR (100) NULL,
[SCHOOL] NVARCHAR (100) NULL,
PRIMARY KEY (ID)
);
Autoincrement keyword allows the
user to create a unique number to get
generated whenever a new record is
inserted into the table.
This keyword is usually required
whenever PRIMARY KEY in SQL is used.