I don't use MySQL (I'm a Pg fan) so there could be some way but, if so, it is not standard SQL
I think your approach is right (i.e. I don/t know a better way to do it) but I'm wondering about the correctness of the idea behind it: if your table2 has only the column property and it is automatically populated when you insert into table1, what is the need for a separate table?
Rule One: "Do not act incautiously when confronting a little bald wrinkly smiling man."
In reply to Re: SQL question: Insertion with FK constraint
by psini
in thread SQL question: Insertion with FK constraint
by lihao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |