Is it possible to use LAST_INSERT_ID() within an insert query?
INSERT INTO mytable (col1, col2) VALUES (\'val1\', null), (\'val2\', LAST_INSERT_ID())
From what i found it won't work as LAST_INSERT_ID doesn't have a value until the whole statement has finished.