mysql remove first and last character from string

Solutions on MaxInterview for mysql remove first and last character from string by the best coders in the world

showing results for - "mysql remove first and last character from string"
Alejandro
30 Aug 2017
1/* remove any first & last character in mysql*/
2SELECT substring(myfield,2, length(myfield)-2) FROM mytable;
Jana
07 May 2016
1SELECT TRIM(BOTH ',' FROM name) from users; /*trim leading and trailing ,*/
2SELECT TRIM(LEADING ',' FROM name) from users;/*trim leading,*/
3SELECT TRIM(TRAILING ',' FROM name) from users; /*trim trailing,*/