Tag: mysql string manipulation
-
MySQL SUBSTR function
SUBSTR function returns the sub string within a string. Syntax: SUBSTR(string, start_position, length) or SUBSTRING (string, start_position, length) In MySQL both SUBSTR and SUBSTRING will work. SUBSTR is in ANSI standard. Examples:- mysql> select SUBSTR(‘sqlandplsql.com’,1,11); will return – sqlandplsql mysql> select SUBSTRING(‘sqlandplsql.com’,1,11); will return – sqlandplsql mysql> select SUBSTR(‘sqlandplsql.com’,2); will return – qlandplsql If you omit the […]