Storing GUID/UUID in a My SQL database

Partho Sarathi

25 Jun, 2013 · 1 minute read

  • Share:

Use the BINARYdata type with a size of 16. This saves the value in binary, thus saving a few bytes.

Use the following if you are trying to insert values to a GUID column using ADO .NET:-

Convert the Guid value to a byte array:-

((Guid)value).ToByteArray()

  • Share:

The cleanest blogging platform


2024 © Maxotek. All rights reserved.