[求助]SQL一段程序理解
use Librarygo
declare @position int,@string char(15) ——声明变量
set @position=1
set @string='BeiJing' ——变量赋值
while @position<=datalength(@string)
begin
select ASCii(substring(@string,@position,1))as ASCCode,
char (AScii(substring(@string,@position,1)))as ASCChar
set @position = @position+1
end
go
请高手解释下,变量赋值有的循环语句