Published · 1 min read

Storing GUID/UUID in a Firebird database

Use the CHAR data type with a size of 16 and the OCTETS character set. This saves the value in binary, thus saving a few bytes.

Use the CHAR data type with a size of 16 and the OCTETS character set. 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:-

((FbParameter)parameter).FbDbType = FbDbType.Guid;

Convert the Guid value to a string representation using the following code:-

((Guid)value).ToString("D")

Partho Sarathi

Partho Sarathi

Founder, Maxotek

Databases

Our blog

Related posts

Tutorials, notes and news from Maxotek.

  • Comparing Schemas

    The Data Comparison plugin of Data Utensil allows you to compare two schemas. Once the comparison is complete, you can see whether a pair of tables are identical, have different columns, are new or…

    Partho Sarathi

    Partho Sarathi

  • Quick Aggregate SQL Result

    A handy feature of Data Utensil is that you can apply aggregate functions (such as Count, Max, Min, Sum, Avg, etc) on a table by right clicking on the column header of the Table Data View .

    Partho Sarathi

    Partho Sarathi

View all posts

See what Maxotek makes

Monitoring, conversion tools and more, built by the same people who wrote these posts.