MySQL Forums
Forum List  »  Stored Procedures

Re: UUID column type
Posted by: Vince Garvin
Date: September 08, 2007 03:46PM

Just for info, the info to get the opposite:

CREATE FUNCTION `BINTOUUID`(UUID BINARY(16)) RETURNS char(36)
BEGIN
RETURN concat(HEX(LEFT(uuid,4)),'-', HEX(MID(uuid,5,2)),'-', HEX(MID(uuid,7,2)),'-',HEX(MID(uuid,9,2)),'-',HEX(RIGHT(uuid,6)));
END

Cheers,
Vince.

Options: ReplyQuote


Subject
Views
Written By
Posted
66447
October 16, 2005 10:15AM
29108
October 18, 2005 09:03AM
21997
October 18, 2005 07:47PM
28052
October 19, 2005 07:28AM
18827
October 28, 2005 03:58AM
Re: UUID column type
17329
September 08, 2007 03:46PM
15854
November 04, 2005 09:22AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.