How to create a table with foreign key constraint | Sololearn: Learn to code for FREE!
Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок
0

How to create a table with foreign key constraint

There are two tables salesman and order, salesman id used as foreign key in order table

13th Dec 2019, 6:08 PM
samridhi dwivedi
samridhi dwivedi - avatar
1 ответ
0
And most probably salesman id is your primary key in the table salesman. You can do the following while creating the table order- Foreign key (salesman_id) References salesman (salesman_id)
13th Dec 2019, 7:21 PM
Avinesh
Avinesh - avatar