Here customerNo will be a primary key if u write it.
create table customers
(
customerNo int identity not null primary key,
customerName varchar(30) not null,
Address varchar(30),
contact varchar(25),
DateInSystem smalldatetime not null
)
now to make a composite key just put the primary key on two column.. When we set the constraint on two field to be primary key then it is called composite key.
create table customers
(
customerNo int primary key, CustomerId int primary key,
customerName varchar(30) not null,
Address varchar(30),
contact varchar(25),
DateInSystem smalldatetime not null
)
Comment