In SQL Server, how can I show a byte representation of data in an NVARCHAR column?
e.g.
DECLARE @Example NVARCHAR(10) = 'Hello';
SELECT CAST(@Example AS ???)
# should produce something like '48656c6c6f'
NVARCHAR is UTF-16 and can be cast to varbinary:
DECLARE @Example NVARCHAR(10) = 'Hello';
SELECT CAST(@Example AS varbinary)
# produces 0x480065006C006C006F00