sean c peters wrote:

But when I load a parent table, an auto_increment column autogenerates a value that will be a foreign key in a child table. So i cant create the file to load into the child table until after the parent table has been loaded. Then i'll need to get back all the auto increment values just created, and put them into the load file for the child tables.

If no one else is going to be adding rows to the tables while you're doing the
loading, then you can make your own values for the auto_increment column
and include them in the text file rather than letting MySQL generate them.
Just find the max current value and start counting from there, and using the
same values in the child tables.


I do something similar for one of my databases, and it works because there's
no other process for inserting rows into those tables. That may not apply to
your situation, though.


--
Keith Ivey <[EMAIL PROTECTED]>
Washington, DC


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



Reply via email to