RIGHT(): starts at the right-most character and counts to the left, returning the specified number of characters : RIGHT « String Functions « SQL Server / T-SQL






RIGHT(): starts at the right-most character and counts to the left, returning the specified number of characters


1>
2> -- RIGHT(): starts at the right-most character and counts to the left, returning the
3> -- specified number of characters.
4>
5>
6> DECLARE @FullName VarChar(25)
7> SET @FullName = 'George Washington'
8> SELECT RIGHT(@FullName, 5)
9>
10> GO

-----
ngton

(1 rows affected)
1>
           
       








Related examples in the same category

1.RIGHT: return a number of characters from the right-hand side of a string
2.RIGHT(@RIGHT_STRING,10)
3.Get string to the right