All pastes #2070304 Raw Edit

Someone

public text v1 · immutable
#2070304 ·published 2011-05-27 12:44 UTC
rendered paste body
UPDATE Books SET url='bookid='+LAST_INSERT_ID() WHERE id=LAST_INSERT_ID();

I want to update the last book inserted with an URL like this:

bookid=34

(If last id is e.g 34)

CONCAT Like this:

UPDATE Books SET url=CONCAT('bookid='+LAST_INSERT_ID()) WHERE id=LAST_INSERT_ID();