Use the IDENTITY property with CREATE TABLE.
This example creates a new table using the IDENTITY property for an automatically incrementing identification number.
USE pubs
IF EXISTS(SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME = 'new_employees')
DROP TABLE new_employees
GO
CREATE TABLE new_employees
(id_num int IDENTITY(1,1),
fname varchar (20),
minit char(1),
lname varchar(30)
)
Rick.