From: Date: May 13 2004 12:10am Subject: Re: GUID storage List-Archive: http://lists.mysql.com/mysql/165315 Message-Id: <20040512221002.GA81440@dan.emsphone.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In the last episode (May 12), Larry Lowry said: > Well I'm trying to move to MySQL from the MS SQL Server world. Most > data elements are easy except for the uniqueidentifier. > > In the MySQL world what is the preferred/best way to store a > uniqueidentifier? The easiest would just be a char(36). What is a "uniqueidentifier"? 36 chars sounds like a uuid, in which case a char(36) is probably the most transparent. If you convert them to raw form they will fit in a binary char(16), though. You could even write uuid_to_string and uuid_from_string UDFs to simplify conversion. -- Dan Nelson dnelson@stripped