Adding the primary key for two columns




CREATE TABLE Persons (
    ID int NOT NULL,
    LastName varchar(255) NOT NULL,
    FirstName varchar(255),
    Age int,
CONSTRAINT PK_Person PRIMARY KEY (ID,LastName)


Comments

Popular posts from this blog

T-SQL Script to find High CPU Queries

Audit enable on a table for select , delete ,insert