MySQL foreign keys support
#1

Heya there, I can't really understand the way foreign keys works in SAMP MySQL

If I have a parent table called users, and two child tables called toys and weapons
And I foreign them on the Auto Increase Primary column named ID (which exists in all of them)
If I insert data to the users table (ID Password and Name for example)
1. Would that automatically add a row with the given ID to the child tables ?
2. If I wipe one row from the users table, would that wipe the rows from the child tables aswell ?

Note: I put it to RESTRICT on both update and delete
Reply


Messages In This Thread
MySQL foreign keys support - by NeXoR - 05.05.2016, 02:24
Re: MySQL foreign keys support - by Vince - 05.05.2016, 08:45
Re: MySQL foreign keys support - by NeXoR - 05.05.2016, 11:00
Re: MySQL foreign keys support - by NeXoR - 05.05.2016, 16:30

Forum Jump:


Users browsing this thread: 1 Guest(s)