add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
DECLARE @str varchar(100)='hello';

DECLARE @sqlBinary varbinary(1000) = 0X12345678 + COMPRESS(@str);

SELECT CAST(DECOMPRESS(
SUBSTRING(@sqlBinary, 5, LEN(@sqlBinary))
) AS varchar(100));
(No column name)
hello