Monthly Archives: March 2023

UUIDv4 in MySQL

Although MySQL has a UUID() function, it returns a version 1 UUID, which is time-based and has mostly been replaced by the completely random version 4. I recently needed a v4 in a query, and adapted this from some different options I found online: You can either use this inline in your select statement, or convert […]