Re: UUID column type
Posted by:
Svend Høst
Date: October 28, 2005 03:58AM
Hi
I've created this function and it seems to be working fine.
CREATE FUNCTION `MyUUID`() RETURNS binary(16)
BEGIN
DECLARE my_uuid char(37);
SET my_uuid = UUID();
RETURN CONCAT(UNHEX(LEFT(my_uuid,8)),UNHEX(MID(my_uuid,10,4)),UNHEX(MID(my_uuid,15,4)),UNHEX(MID(my_uuid,20,4)),UNHEX(RIGHT(my_uuid,12)));
END
Can i assign the result of MyUUID as a default column value if none isn't supplied ?
thanks
Subject
Views
Written By
Posted
65764
October 16, 2005 10:15AM
28865
October 18, 2005 09:03AM
21724
October 18, 2005 07:47PM
27777
October 19, 2005 07:28AM
Re: UUID column type
18560
October 28, 2005 03:58AM
17112
September 08, 2007 03:46PM
15658
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.