用SQL查看字符串ASCII码
DECLARE @position int, @nstring nchar(12)
SET @position = 1
SET @nstring = N'字符串' PRINT 'Character #' + ' ' +
'Unicode Character' + ' ' + 'UNICODE Value' WHILE @position <= DATALENGTH(@nstring)
BEGIN
SELECT @position, CONVERT(char(17), SUBSTRING(@nstring, @position, 1)),
UNICODE(SUBSTRING(@nstring, @position, 1))
SELECT @position = @position + 1 END
SET @position = 1
SET @nstring = N'字符串' PRINT 'Character #' + ' ' +
'Unicode Character' + ' ' + 'UNICODE Value' WHILE @position <= DATALENGTH(@nstring)
BEGIN
SELECT @position, CONVERT(char(17), SUBSTRING(@nstring, @position, 1)),
UNICODE(SUBSTRING(@nstring, @position, 1))
SELECT @position = @position + 1 END