首页 数据库 mysql 正文

mysql字符串截取方法

long 2020-03-25 00:47 mysql 人气651

函数substring:

substring(字符串,起始索引,长度 )

起始索引从1开始。

例子

substring("asdf",1,2)

结果“as”