Substring In SQL – Programming, Pseudocode Example, C# Programming Example

Substring In SQL

The SUBSTRING() function in SQL is used to extracts characters from a string.

Syntax : SUBSTRING(string, start_index, length_of_character)

Above Syntax string parameter is the string passed for extraction, start_index is the index where the extraction starts length_of_character is the length of characters to extract from string.

start index of extraction for all string in SQL starting index is always 1.

If you pass negative number in length parameter it will throw and error.

SQL Code:

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: