
If start_position is positive (greater than 0), the function counts the position from the beginning of the string to find the starting character.If start_position is 0, it is treated as 1.There are a couple of variations that can be used for this parameter: If it is not specified, the function returns the entire string.Īs mentioned, the start_position starts at 1. length (optional): This is the number of characters to extract from string, to create the substring.start_position (mandatory): This is the starting position of the substring within the string.string (mandatory): This is the base string value that the substring is obtained from.The parameters of the SUBSTR function are: The syntax of the SUBSTR function is: SUBSTR (string, start_position, ) It’s good for splitting data and getting the part you need from a longer string. It’s one of the many string manipulation functions in Oracle, and it’s a common feature of many programming languages.

The smaller string is called the substring, which is where the name of the SUBSTR function comes from (SUBSTRing) This Oracle SUBSTR function allows you to extract a smaller string from within a larger string. Let’s take a look at how you can use it and some examples.

The Oracle SUBSTR function is used to get a smaller string (the substring) from within a larger string.
