Sqlserver
 sql >> Database >  >> RDS >> Sqlserver

Converti campo ID binario in testo

Puoi convertire stringhe unicode in binari usando

SELECT CONVERT(VARBINARY(40),N'Hello World')
(returns 0x480065006C006C006F00200057006F0072006C006400)

Converti da binario a unicode usando

SELECT CONVERT(NVARCHAR(20), 0x480065006C006C006F00200057006F0072006C006400)
(returns 'Hello World')