In MySQL, this is UUID (). so the query will look like this:
insert into cars (id, Make, Model) values(UUID(), "Ford", "Mustang")
If you want to reuse uuid, you can do it like this:
set @id=UUID(); insert into cars (id, Make, Model) values(@id, "Ford", "Mustang"); select @id;
Fusca Software Feb 25 '16 at 12:28 2016-02-25 12:28
source share