Mega Code Archive

 
Categories / MSSQL Tutorial / String Functions
 

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

4> DECLARE @RIGHT_STRING  char(100) 5> SET @RIGHT_STRING = "www.rntsoft.com, www.rntsoft.com rntsoft" 6> SELECT RIGHT(@RIGHT_STRING,10) 7> GO -------------------- (1 rows affected) 1> 2> DECLARE @RIGHT_STRING varchar(100) 3> SET @RIGHT_STRING = "rntsoft" 4> SELECT RIGHT(@RIGHT_STRING,10) 5> GO -------------------- rntsoft (1 rows affected)