Home >Database >Mysql Tutorial >输出字符串“SQL Server 2008”中的每一个字符及其ASCII值。

输出字符串“SQL Server 2008”中的每一个字符及其ASCII值。

WBOY
WBOYOriginal
2016-06-07 14:56:372244browse

如题 无 declare @len intset @len = LEN('SQL Server 2008')declare @n intset @n = 1while @n = @lenBEGINprint ascii(SUBSTRING('SQL Server 2008',@n,1))set @n = @n +1END

如题
declare @len int
set @len = LEN('SQL Server 2008')
declare @n int
set @n = 1
while @n <= @len
	BEGIN
		print ascii(SUBSTRING('SQL Server 2008',@n,1))
		set @n = @n +1
	END
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn