Substring: get the substring : Substring « String Functions « SQL Server / T-SQL






Substring: get the substring


1> DECLARE @FullName VarChar(25)
2> SET @FullName = 'www.java2s.com'
3> SELECT SUBSTRING(@FullName, CHARINDEX('.', @FullName) + 1, LEN(@FullName))
4> GO

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

(1 rows affected)
1>
2>
           
       








Related examples in the same category

1.SUBSTRING(string_to_remove_string_from, start_position, length)
2.SUBSTRING(): starts at a position and counts characters to the right, returning a substring of a specified length
3.Combine Lower() Upper() and substring() function to capital the first letter in a word