How can I use this trick: How to get ID of the last updated row in MySQL? in Go (golang)?
I am using the go-sql-driver. It should work with these two queries but how can I do it in Go?
INSERT INTO table (unique_id) VALUES ("test")
ON DUPLICATE KEY UPDATE id=LAST_INSERT_ID(id);
SELECT LAST_INSERT_ID();