Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Mysql Uuid()

forums forums Mysql Uuid()

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #9238
      The Mask
      Member

      I have read conflicting views about which mySQL column type to use to store UUIDs. I am currently using char(36) which appears to work fine but can anybody please confirm this is the right choice? Thanks

    • #19244
      peterlaursen
      Participant

      I absolutely am not at home here but MySQL documentation says:

      http://dev.mysql.com/doc/mysql/en/miscella…functions.html:

      A UUID is a 128-bit number represented by a string of five hexadecimal numbers in aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee format:

      .. and that is 36 characters indeed, if you want to store it as a string.

      a 128 bit integer is a little higher than 3.4e+38 ( = 34 followed by 37 “0”s if you prefer!) in decimal notation and since range of a BIGINT is only -9223372036854775808 to 9223372036854775807 (far from 3.4+38) I guess you will have to store it as a string!

      Another resource:

      http://searchwebservices.techtarget.com/sD…i805876,00.html

Viewing 1 reply thread
  • You must be logged in to reply to this topic.