UUID is a 128-bit value. The CHAR(16) FOR BIT DATA reflects the fact that bit data is stored in character form for brevity. I don't think VARCHAR(16) will work because it does not have a bit flag. A database would need to be able to convert binary data into character data that deals with encoding, and is risky. More importantly, he would not buy anything. Since the UUID is always 128 bits, you do not get space savings from using VARCHAR over CHAR . So you can also use the intended CHAR(16) FOR BIT DATA .
With JDBC, I think you are using the get / setBytes () method as it deals with small amounts of binary data. (Not positive, I would have to try this)
And I donβt know about the part of SQL Server.
source share