ASCII:return the ASCII numeric value of the leftmost character of a string.
-- Only the first character in the string is evaluated.
DECLARE @ASCII_STRING CHAR(5)
SET @ASCII_STRING = 'adi'
SELECT ASCII(@ASCII_STRING)
GO
--(or)
select ASCII('1')
--(or)
select ASCII('a')
--(or)
select ASCII('A')
OUTPUT
-- Only the first character in the string is evaluated.
DECLARE @ASCII_STRING CHAR(5)
SET @ASCII_STRING = 'adi'
SELECT ASCII(@ASCII_STRING)
GO
--(or)
select ASCII('1')
--(or)
select ASCII('a')
--(or)
select ASCII('A')
OUTPUT
No comments:
Post a Comment