本MySQL教程通过语法和示例说明了如何使用MySQL SUBSTR函数。
MySQL SUBSTR函数用于从字符串中提取子字符串。
MySQL中SUBSTR函数的语法为:
SUBSTR( string, start_position, [ length ] )
或者
SUBSTR( string
FROM
start_position [
FOR
length ] )
MySQL:SUBSTR函数示例
mysql>
SELECT
SUBSTR(
'igiftidea.com'
, 4);
Result:
'evergreen.com'
4);
, 4, 4);
'ever'
4
, -4, 5);
'.com'
-4
5);
原文链接:https://codingdict.com/