substr
Description
Syntax
VARCHAR substr(VARCHAR content, INT start, INT length)
Find a substring, return the part of the string described by the first parameter starting from start and having a length of len. The index of the first letter is 1.
example
1. mysql> select substr("Hello doris", 2, 1);
2. +-----------------------------+
3. | substr('Hello doris', 2, 1) |
4. +-----------------------------+
5. | e |
6. +-----------------------------+
7. mysql> select substr("Hello doris", 1, 2);
8. +-----------------------------+
9. | substr('Hello doris', 1, 2) |
10. +-----------------------------+
11. | He |
12. +-----------------------------+
keywords
1. SUBSTR
