日期:2014-05-16  浏览次数:20444 次

oracle uuid的方法
CREATE OR REPLACE FUNCTION "UUID" RETURN varchar2 IS
tmpVar varchar2(50);
/******************************************************************************
   NAME:       uuid
   PURPOSE:    

   REVISIONS:
   Ver        Date        Author           Description
   ---------  ----------  ---------------  ------------------------------------
   1.0        2006-1-16          1. Created this function.

   NOTES:

   Automatically available Auto Replace Keywords:
      Object Name:     uuid
      Sysdate:         2006-1-16
      Date and Time:   2006-1-16, 14:42:35, and 2006-1-16 14:42:35
      Username:         (set in TOAD Options, Procedure Editor)
      Table Name:       (set in the "New PL/SQL Object" dialog)

******************************************************************************/
BEGIN
   tmpVar := '';
   tmpVar := sys_Guid();
   RETURN tmpVar;
   EXCEPTION
     WHEN NO_DATA_FOUND THEN
       NULL;
     WHEN OTHERS THEN
       -- Consider logging the error and then re-raise
       RAISE;
END uuid;