Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Oracle and UUID

Oracle and UUID

Scheduled Pinned Locked Moved Database
databasesql-serveroraclesysadminquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Michael P Butler
    wrote on last edited by
    #1

    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

    I R 2 Replies Last reply
    0
    • M Michael P Butler

      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

      I Offline
      I Offline
      ian mariano
      wrote on last edited by
      #2

      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/

      1 Reply Last reply
      0
      • M Michael P Butler

        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

        R Offline
        R Offline
        Rashid Thadha
        wrote on last edited by
        #3

        You might want to try and use Oracle Sequence (similar to SQL seeded Identifier)

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups