SQL Substring is an inbuilt function that is used to extract the part of a string from an original string given as an input to the function. Part of the string is known as a substring. The SUBSTRING functions allow you to extract a substring from a string.
SQL SUBSTRING() method allows us to obtain the substring from the main string. If there is some use case like you want to check the part of the output string then you can use the substring() function.
See the syntax of the Substring function.
SELECT SUBSTRING (input_string, start_position, length);
See the following parameters.
If the start + length > the length of input_string, a substring will begin at the start and will include the remaining characters of the input_string.
#sql #sql substring