RIGHT(@RIGHT_STRING,10) : RIGHT « String Functions « SQL Server / T-SQL






RIGHT(@RIGHT_STRING,10)

1> -- This produces a result of ten spaces, because the last 10 characters are 
space filled.
2>
3> DECLARE @RIGHT_STRING varchar(100)
4> SET @RIGHT_STRING = "www.java2s.com"
5>
6> SELECT RIGHT(@RIGHT_STRING,10)
7> GO

----------
java2s.com

(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: return a number of characters from the right-hand side of a string
3.Get string to the right