SUBSTRING(expression, start, length)
示例:
SELECT SUBSTRING(字段名, 1, 8) FROM 表名
从第start个开始,截取长度为length
SUBSTRING(expression, start, length)
从左边开始截取
LEFT(expression, length)
从右边开始截取
RIGHT(expression, length)
注:expression为字段名,length长度
2024-03-20 22:58:52
SUBSTRING(expression, start, length)
示例:
SELECT SUBSTRING(字段名, 1, 8) FROM 表名
从第start个开始,截取长度为length
SUBSTRING(expression, start, length)
从左边开始截取
LEFT(expression, length)
从右边开始截取
RIGHT(expression, length)
注:expression为字段名,length长度