Answers for "mysql remove first and last character from string"

SQL
1

mysql remove first and last character from string

/* remove any first & last character in mysql*/
SELECT substring(myfield,2, length(myfield)-2) FROM mytable;
Posted by: Guest on August-04-2021
0

mysql remove first and last character from string

SELECT TRIM(BOTH ',' FROM name) from users; /*trim leading and trailing ,*/
SELECT TRIM(LEADING ',' FROM name) from users;/*trim leading,*/
SELECT TRIM(TRAILING ',' FROM name) from users; /*trim trailing,*/
Posted by: Guest on August-04-2021

Code answers related to "mysql remove first and last character from string"

Code answers related to "SQL"

Browse Popular Code Answers by Language