in reply to SQL question: Insertion with FK constraint
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."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: SQL question: Insertion with FK constraint
by lihao (Monk) on Jun 26, 2008 at 15:14 UTC | |
by psini (Deacon) on Jun 26, 2008 at 15:38 UTC |