This parameter defines a string expression from which you want to extract the substring. SUBSTRING() function accepts following parameters: It extracts the substring, starting from the specified position defined by the parameter.įollowing is the syntax for the SUBSTRING() SUBSTRING(input_string, starting_position, length) SQL Server SUBSTRING() function is used to extract the substring from the given input_string. These functions can be used to perform pattern matching.įirst, let me explain the SUBSTRING function and provide examples with it. In my previous article about T-SQL regular expressions, I have explained the LIKE operator, its usage and provided several examples with it. In this article, we are going to discuss the SUBSTRING, PATINDEX, and CHARINDEX functions of T-SQL.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |