guid?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ChetG

    #1

    guid?

    hi all, is there a guid available in mysql?

    "select newid()" in sqlserver will give a global unique id -
    uniqueidentifie r is the datatype...

    looks like this: {453A731A-9449-4246-BFE9-6096B9D791C7}

    thanks, chester







    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004


  • Mike Chirico

    #2
    Re: guid?


    "ChetG" <chetmail@hotma il.com> wrote in message
    news:a84zc.1218 1$ar2.5349@fe2. texas.rr.com...[color=blue]
    > hi all, is there a guid available in mysql?
    >
    > "select newid()" in sqlserver will give a global unique id -
    > uniqueidentifie r is the datatype...
    >
    > looks like this: {453A731A-9449-4246-BFE9-6096B9D791C7}
    >
    > thanks, chester[/color]

    In MySQL 4.1.2 there is a uuid

    mysql> select uuid();
    +-------------------------------------------------+
    | uuid() |
    +-------------------------------------------------+
    | 1e0a8534-0ee3-1027-af05-0004e222b485 |
    +-------------------------------------------------+
    1 row in set (0.01 sec)

    Regards,

    Mike Chirico


    Comment

    • Siemel Naran

      #3
      Re: guid?

      "Mike Chirico" <mchirico@comca st.net> wrote in message
      news:qZadnXXkw_ a7e1HdRVn-
      [color=blue]
      > In MySQL 4.1.2 there is a uuid
      >
      > mysql> select uuid();
      > +-------------------------------------------------+
      > | uuid()[/color]
      |[color=blue]
      > +-------------------------------------------------+
      > | 1e0a8534-0ee3-1027-af05-0004e222b485 |
      > +-------------------------------------------------+
      > 1 row in set (0.01 sec)[/color]

      What use is this uuid?


      Comment

      • Chris Hope

        #4
        Re: guid?

        Siemel Naran wrote:
        [color=blue]
        > What use is this uuid?[/color]

        A Universal Unique Identifier. Refer to the MySQL manual at
        http://dev.mysql.com/doc/mysql/en/Mi...functions.html
        and scroll down to the UUID() function which explains what it is and how
        it's constructed.

        This function is available from MySQL 4.1.2

        --
        Chris Hope
        The Electric Toolbox - http://www.electrictoolbox.com/

        Comment

        • Siemel Naran

          #5
          Re: guid?

          "Chris Hope" <chris@electric toolbox.com> wrote in message[color=blue]
          > Siemel Naran wrote:[/color]
          [color=blue][color=green]
          > > What use is this uuid?[/color]
          >
          > A Universal Unique Identifier. Refer to the MySQL manual at
          > http://dev.mysql.com/doc/mysql/en/Mi...functions.html
          > and scroll down to the UUID() function which explains what it is and how
          > it's constructed.
          >
          > This function is available from MySQL 4.1.2[/color]

          Thanks, it helps. But I'd like to know what's the practical business value
          of this function. Who would use it and why?


          Comment

          • Chris Hope

            #6
            Re: guid?

            Siemel Naran wrote:
            [color=blue]
            > Thanks, it helps.  But I'd like to know what's the practical business
            > value of this function.  Who would use it and why?[/color]

            It generates a value that should be unique across multiple computers. This
            is useful for database replication and also when you may need to merge data
            from one database into another. If you're using auto incremental values
            there'll be duplicate records in each database, but using a unique value
            such as this means the primary key from both databases should be unique..

            --
            Chris Hope
            The Electric Toolbox - http://www.electrictoolbox.com/

            Comment

            • ChetG

              #7
              Re: guid?

              exactly...i am writing software that will hopefully be sold to 1000's of
              people...at some point, they might wish to merge into a 'web app
              subscription' model and then all i have to do is upload their data with 100%
              integrity and they can immediately co-exist with other data.

              regards, chet


              "Chris Hope" <chris@electric toolbox.com> wrote in message
              news:1087200976 _61214@news.ath enanews.com...
              Siemel Naran wrote:
              [color=blue]
              > Thanks, it helps. But I'd like to know what's the practical business
              > value of this function. Who would use it and why?[/color]

              It generates a value that should be unique across multiple computers. This
              is useful for database replication and also when you may need to merge data
              from one database into another. If you're using auto incremental values
              there'll be duplicate records in each database, but using a unique value
              such as this means the primary key from both databases should be unique.

              --
              Chris Hope
              The Electric Toolbox - http://www.electrictoolbox.com/


              ---
              Outgoing mail is certified Virus Free.
              Checked by AVG anti-virus system (http://www.grisoft.com).
              Version: 6.0.699 / Virus Database: 456 - Release Date: 6/4/2004


              Comment

              Working...