CREATE OR REPLACE FUNCTION NEWUUID()
RETURNS CHAR(36)
BEGIN
    DECLARE @UUID CHAR(32);
    SET @UUID=LOWER(HEX(RAND()*255) || HEX(RAND()*255));
    RETURN LEFT(@UUID,8)||'-'||
        SUBSTR(@UUID,9,4)||'-'||
        SUBSTR(@UUID,13,4)||'-'||
        SUBSTR(@UUID,17,4)||'-'||
        RIGHT(@UUID,12);
END
/

ALTER TABLE UM_USER ADD COLUMN UM_USER_ID CHAR(36) NOT NULL DEFAULT 'NONE'
/
CALL SYSPROC.ADMIN_CMD('REORG TABLE UM_USER')
/

UPDATE UM_USER SET UM_USER_ID = NEWUUID()
/
CALL SYSPROC.ADMIN_CMD('REORG TABLE UM_USER')
/
