Oracle and UUID
-
Does Oracle have the equivlant of the SQL Server NewID() function. I'd like to generate a UUID inside a Oracle (9i) stored procedure but can't seem to find a function. Does such a function exist? Michael "I've died for a living in the movies and tv. But the hardest thing I'll ever do is watch my leading ladies, Kiss some other guy while I'm bandaging my knee." -- The Unknown Stuntman
-
Does Oracle have the equivlant of the SQL Server NewID() function. I'd like to generate a UUID inside a Oracle (9i) stored procedure but can't seem to find a function. Does such a function exist? Michael "I've died for a living in the movies and tv. But the hardest thing I'll ever do is watch my leading ladies, Kiss some other guy while I'm bandaging my knee." -- The Unknown Stuntman
No such method I know of exists, but you can create a UUID in your data access layer for new ids, convert it to a string and just pass it into your insert stored procedure or table insert statement. Alternatively, you could write an external add in to Oracle to do it, and call that from your stored procedure. I've never done it, I've just used the method above ;)
"The greatest danger to humanity is humanity without an open mind."
- Ian Mariano
http://www.ian-space.com/ -
Does Oracle have the equivlant of the SQL Server NewID() function. I'd like to generate a UUID inside a Oracle (9i) stored procedure but can't seem to find a function. Does such a function exist? Michael "I've died for a living in the movies and tv. But the hardest thing I'll ever do is watch my leading ladies, Kiss some other guy while I'm bandaging my knee." -- The Unknown Stuntman
You might want to try and use Oracle Sequence (similar to SQL seeded Identifier)