In general, there are two tables in the database. Mysql
First:id | name | lastname | surname | id_key |
Second:id_key | car | city|
id_key
without AI code consists of six digits.
It is necessary for me that when a user id_key
code ( id_key
), that, another table would appear in his table as well. What is needed for this? Create a foreign key from id_key
, how?