Hi,

Is it possible to insert values into two tables simultaneously and
have the value of one of the columns in the second table be the
auto_increment value from inserting into the first?

E.g. if table1 has an auto_increment column c1, the logic I'm looking
for would be something like:

INSERT INTO table1(c2, c3, c4), table2(c5, c6, c7) VALUES ('v1', 'v2',
'v3', table1.c1, 'v4', 'v5');

where table2.c5 is a reference to table1.c1.

Thanks,
Hamish

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to