Mysql SUBSTRING() function

MySQL SUBSTRING() Function

Example

Extract a substring from a string (start at position 5, extract 3 characters):
SELECT SUBSTRING("SQL Tutorial"53AS ExtractString;
Try it Yourself »

Definition and Usage

The SUBSTRING() function extracts a substring from a string (starting at any position).
Note: The SUBSTR() and MID() functions equals to the SUBSTRING() function.

Syntax

SUBSTRING(stringstartlength)
OR:
SUBSTRING(string FROM start FOR length)

Comments

Post a Comment

Popular posts from this blog

Lab Network 2024

Step to publish your static html web page to GitHub

Tutorial OOP(reversion java)