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

阅读更多
文章标签: output
个人分类: SQL
上一篇quine (T-SQL Version, Excerpt From WWW)
下一篇在Windows上用Perl模拟Unix的Which命令
想对作者说点什么? 我来说一句

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

关闭
关闭
关闭