RIGHT: return a number of characters from the right-hand side of a string : RIGHT « String Functions « SQL Server / T-SQL






RIGHT: return a number of characters from the right-hand side of a string


1> -- RIGHT: return a number of characters from the right-hand side of a string.
2>
3> DECLARE @RIGHT_STRING char(100)
4> SET @RIGHT_STRING = "www.java2s.com"
5>
6> SELECT RIGHT(@RIGHT_STRING,10)
7> GO

----------


(1 rows affected)
1>
           
       








Related examples in the same category

1.RIGHT(): starts at the right-most character and counts to the left, returning the specified number of characters
2.RIGHT(@RIGHT_STRING,10)
3.Get string to the right