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

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -