SQL UUID as String

This is just a quick post, merely documenting something I found when working with SQLs Unique Identifiers/UUID as a string.

SELECT CONVERT(NVARCHAR(50), rid) FROM _tablename_  

Now, your usual identifier which is formatted as ########-####-####-####-############ will now be returned as the value, not some crazy encoded string!


comments powered by Disqus