MySQL :: MySQL 5.0 Reference Manual :: 13.2.5.1 INSERT ... SELECT Syntax

MySQL :: MySQL 5.0 Reference Manual :: 13.2.5.1 INSERT ... SELECT Syntax

瀏覽:573
日期:2024-09-09
Having the same problem mentioned above (last_insert_id() returns "0"), I found this solution. You can use the following select statement: SELECT id FROM mytable WHERE id IS NULL; "id" has to be an auto_increment column to make it work. It will return the...看更多