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
65932
October 16, 2005 10:15AM
28909
October 18, 2005 09:03AM
21795
October 18, 2005 07:47PM
27842
October 19, 2005 07:28AM
18612
October 28, 2005 03:58AM
Re: UUID column type
17158
September 08, 2007 03:46PM
15700
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.