How is the references keyword used when creating a table?
Let’s say I want to create two tables person and hobby and I want the hobby table id to reference the id of person?
person table
- id
- name
hobby
- id
- person_id
- hobby_name
How do I do that?
Create the hobby table similarly to this: