Mega Code Archive

 
Categories / MSSQL / String Functions
 

RIGHT()

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>