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






4> DECLARE @RIGHT_STRING char(100)
5> SET @RIGHT_STRING = "www.java2s.com, www.java2s.com java2s"
6> SELECT RIGHT(@RIGHT_STRING,10)
7> GO

--------------------


(1 rows affected)
1>
2> DECLARE @RIGHT_STRING varchar(100)
3> SET @RIGHT_STRING = "java2s"
4> SELECT RIGHT(@RIGHT_STRING,10)
5> GO

--------------------
java2s

(1 rows affected)








12.16.Right
12.16.1.RIGHT return a number of characters from the right-hand side of a string.
12.16.2.Prefixing a Numeric Value with Zeros
12.16.3.Taking the Rightmost Part of a String
12.16.4.Padding a number for business purposes with right