MID
Synonym for SUBSTRING(). Returns a substring starting at a specified position for a given length.
Syntax
MID(str,pos,len)Description
MID(str,pos,len) is a synonym for SUBSTRING(str,pos,len)!
Examples
SELECT MID('abcd',4,1);
+-----------------+
| MID('abcd',4,1) |
+-----------------+
| d |
+-----------------+
SELECT MID('abcd',2,2);
+-----------------+
| MID('abcd',2,2) |
+-----------------+
| bc |
+-----------------+A negative starting position:
This page is licensed: GPLv2, originally from fill_help_tables.sql
Last updated
Was this helpful?

