quine (T-SQL Version, C-style)

 

/*
because the output parameter of master..xp_sprintf can not exceed 255,
this script can not display the correct result.
but the technique behind the code really works
*/

declare @1 varchar(255), @2 varchar(255), @3 varchar
select @3 = char(0x27), @2 = '
declare @1 varchar(255), @2 varchar(255), @3 varchar
select @3 = char(0x27), @2 = %s%s%s
exec master..xp_sprintf @1 output, @2, @3, @2, @3
print @1'
exec master..xp_sprintf @1 output, @2, @3, @2, @3
print @1

阅读更多
想对作者说点什么?

博主推荐

换一批

没有更多推荐了,返回首页