Home » MySQL String SUBSTR() Function

MySQL String SUBSTR() Function

by Online Tutorials Library

MySQL SUBSTR() Function

The substr() is a String function of MySQL. This function returns the substring from the given string.

Syntax

Parameter:

Str: Main string

Len: length for substring

Pos: position the start the substring from the given string.

Example 1

Output:

MySQL String SUBSTR() Function

Example 2

Output:

MySQL String SUBSTR() Function

Example 3

Output:

MySQL String SUBSTR() Function

Example 4

Output:

MySQL String SUBSTR() Function

Next TopicMySQL String

You may also like