Substring functions
The built-in SQL substring functions return substrings
from character string arguments, or return
positional information for operations on substrings .
Sections that follow describe the syntax and
usage of these substring functions.
CHARINDEX function The CHARINDEX function searches a character string for the first occurrence of a target substring, where the search begins at a specified or default character position within the source string. INSTR function The INSTR function searches a character string for a specified substring, and returns the character position in that string where an occurrence of that a substring ends, based on a count of substring occurrences. LEFT function The LEFT function returns a substring consisting of the leftmost N characters from a string argument.RIGHT function The RIGHT function returns a substring consisting of the rightmost N characters from a string argument.SUBSTR function SUBSTRB function Returns a substring of a string, beginning at a specified position in the string.SUBSTRING function SUBSTRING_INDEX function The SUBSTRING_INDEX function searches a character string for a specified delimiter character, and returns a substring of the leading or trailing characters, based on a count of a delimiter that you specify as an argument to the function.
Have feedback?
Google Analytics is used to store comments and ratings. To provide a comment or rating for a topic, click Accept All Cookies or Allow All in Cookie Preferences in the footer of this page.