10.10.2016, 08:22
Hey, I have tested foreign keys now on my MySQL database and I was wondering about something
I have set it to CASCADE on both, now I have a question, when I delete a row from the parent table it does remove the row from the child, But, when I add a new row it adds nothing on the child table, can I do it to add it automatically ?
Another question: After I delete a row - let's say it's ID is 1, then after I remove it and create the next one then the ID is 2, I mean how can I do it to do the smallest number available
I have set it to CASCADE on both, now I have a question, when I delete a row from the parent table it does remove the row from the child, But, when I add a new row it adds nothing on the child table, can I do it to add it automatically ?
Another question: After I delete a row - let's say it's ID is 1, then after I remove it and create the next one then the ID is 2, I mean how can I do it to do the smallest number available