SQL Server Hexadecimal data type
I'm looking for a datatype in SQL Server that stores data as hexadecimal rather than int, but can开发者_开发问答't find anything similar. Surely there is a hexadecimal datatype?
Store it as an INT
and use the HEX()
function to convert it.
There's no native storage for hexadecimal in SQL Server.
EDIT:
You can also store hex data as VARBINARY
, but there is still a conversion required, and there are data integrity issues with that method as well.
精彩评论