Database | Storage Type | How to convert |
---|---|---|
Oracle | RAW(16) |
REGEXP_REPLACE(binary-guid, '(.{8})(.{4})(.{4})(.{4})(.\*)', '\1-\2-\3-\4-\5')() |
SQL Server | UNIQUEIDENTIFIER |
CONVERT(CHAR(36), binary-guid) |
MySQL | BINARY(16) |
CONCAT_WS('-', SUBSTR(HEX(binary-guid), 1, 8), SUBSTR(HEX(binary-guid), 9, 4), SUBSTR(HEX(binary-guid), 13, 4), SUBSTR(HEX(binary-guid), 17, 4), SUBSTR(HEX(binary-guid), 21)) |
Last active
September 5, 2017 19:57
-
-
Save jarrodhroberson/1d7642a49ad48f791f8c4566468dfd6c to your computer and use it in GitHub Desktop.
converting RAW UUID types to Strings via SQL
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment