0
How do I set primary keys and foreign keys in a table?
4 ответов
+ 1
create table tablename (name(varchar).....) primary key = name
0
create table ***** (name(vachar).......... primary key=name
0
To add foreign key
Alter table tablename add constraint_name foreign key (column_name) references (column_name)
0
alter table table_name add constraint_name primary key (column1,column2,...);
You can create one primary key for each table not more than that but yes, you can select multiple columns if you want