How do you you get the next auto increment value? I think I'm running into the insert...select problem. I want to duplicate records from one table to the _same_ table, with an incremented auto increment value.

Can I do something like this:

insert into table (autoincrement_key, field1, field2) select (get_autoincrement(),field1,field2) from table where autoincrement_key = "31337"

Not so far as I can tell. Unless I'm just not seeing it in the documentation. Is there a function to return the next autoincrement value?

-steve


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



Reply via email to