-- ============================================= -- Add Key template -- -- This template creates a table, then it -- adds a PRIMARY KEY constraint to the table -- ============================================= USE GO IF OBJECT_ID('.', 'U') IS NOT NULL DROP TABLE . GO CREATE TABLE . ( int NOT NULL, column2 char(8) NOT NULL ) GO -- Add a new PRIMARY KEY CONSTRAINT to the table ALTER TABLE . ADD CONSTRAINT PRIMARY KEY () GO