I have migrated MS Sql Server database to MySql (using MySql Workbench tool) and having some hard time to figure out how to store uniqueidentifier in the table. The tool automatically converts the uniqueidentifier to VARCHAR(64) but I am not sure whether this is correct.
In the web, lot of people are saying we can store the uniqueidentifier as CHAR(36) OR BINARY(16) in MySql so, can someone please tell me which one is correct & efficient to use.
Also, I tried BINARY(16) in a sample table to store GUID but it is not storing the full 32 character GUID instead it stores only the first 16 character and truncates the remaining characters. Please advise.
On the side note, I am trying to consume this GUID in the .Net application using Entity Framework 6 so, will this work fine or will I get any conversion error?
According the the MySQL website you should match it to VARCHAR(64)
UNIQUEIDENTIFIER in MSSQL maps to VARCHAR(64) in MySQL