Web development resources
Wednesday, 4 January 2012
MySQL substring
MySQL SUBSTRING()
returns a specified number of characters from a particular position of a given string.
Syntax
SUBSTRING(str, pos, len)
Example
SELECT SUBSTRING('w3resource',4,3);
Explanation
The above MySQL statement returns 3 numbers of characters from the 4th position of the string ‘w3resource’.
Output
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment