Mega Code Archive

 
Categories / MSSQL / String Functions
 

SUBSTRING()

1> -- SUBSTRING(): starts at a position and counts characters to the right,  returning a substring of a specified length. 2> 3> DECLARE @FullName VarChar(25) 4> SET @FullName = 'www.rntsoft.com' 5> SELECT SUBSTRING(@FullName, 4, 6) 6> GO ------ .java2 (1 rows affected) 1> 2>