Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
Yep, it's (almost) that.
The foreign key enforces that the value you put in table2 must exists in table1 at the moment of the insert.
So no, it don't get the value or copy it from table1.
You provide it upon inserting/updating, and the db check at that time it's there in the parent table.
__________________
Only a biker knows why a dog sticks his head out the window.
|