Add some string functions document (#928)

This commit is contained in:
ZHAO Chun
2019-04-16 10:14:49 +08:00
committed by GitHub
parent e5a5b6da16
commit cdd613c5a4
12 changed files with 237 additions and 16 deletions

View File

@ -0,0 +1,27 @@
# length
## Syntax
`INT length(VARCHAR str)`
## Description
返回字符串的长度,对于多字节字符,返回的字符数。比如5个两字节宽度字,返回的长度是10。
## Examples
```
mysql> select length("abc");
+---------------+
| length('abc') |
+---------------+
| 3 |
+---------------+
mysql> select length("中国");
+------------------+
| length('中国') |
+------------------+
| 6 |
+------------------+
```