c# - How i can create a table with two primary keys in T-sql -
this question has answer here:
what problem in code?
create table pharmacy_night ( [id_day] int not null , [id_pharmacy] int, constraint pk_pharmacy_night primary key (id_day, id_pharmacy), constraint fk_pharmacy_night_days foreign key (id_day) references days(id_day), constraint fk_pharmacy_night_pharmacy foreign key (id_pharmacy) references pharmacy (id_pharmacy) )
try composite key
create table abc ( id int, number int, constraint pk_abc primary key (id, number) );
and try primary key
create table abc ( id int primary key, number int )
Comments
Post a Comment