I have seen executing something like this in SQL Server
EXEC (0x53454C45435420312041532054)
or simply like
0x53454C45435420312041532054
Above binary form is equal to SELECT 1 AS T
But I don't remember the exact way how to do this.
Does anyone know executing query like this?
Update:
I know how to convert Binary
into Varchar
and Varchar
into Binary
. What I am asking here is how to execute the query in Binary Form?
This is one way,
Declare @q as nvarchar(1000)
-- 0x530045004C004500430054002000310020004100530020005400 = SELECT 1 AS T
SET @q = CAST(0x530045004C004500430054002000310020004100530020005400 as nvarchar(1000));
EXEC (@q)
Any other way?