How to use the keyword 'references' in MySQL? -
When using the context
keyword is used in the table?
Let's say I want to make two tables person
and hobby
and I want a hobby table ID to reference the person's ID?
person table - id - name hobby - id - person_id - hobby_name
How do I do this?
Prepare hobby list like this:
Make Hobbies Table (ID INT is not an AT & T, the person is not an IID INT, hobby_name VARCHAR (255), primary key (ID), foreign key (person_id) reference person (ID)
Comments
Post a Comment