Search notes:

SQL Server: automatically insert primary key id with IDENTITY columns

A column with the identity property does not need to explicitly be filled with a value in insert statements. SQL Server will automatically provide an increasing and more importantly unique integer (bigint?) for the insert.
Thus, identity-columns are an ideal candidate for primary keys in SQL Server.
create table dbo.tq84_identity (
  id   integer identity
       primary key, -- identity columns are not automatically made primary keys.
  txt  varchar(10)
);

insert into tq84_identity (txt) values ('foo');
insert into tq84_identity (txt) values ('bar');
insert into tq84_identity (txt) values ('baz');

select * from tq84_identity;
--
-- id          txt
-- ----------- ----------
-- 1           foo
-- 2           bar
-- 3           baz

drop table tq84_identity;
Github repository about-MSSQL, path: /sql/create/table/identity.sql

See also

default values in columns.
The inserted identity-value can be obtained with scope_identity(), ident_current or @@identity
Compare with Oracle's identity columns and auto increment feature.
SQL feature T174

Index