1/* remove any first & last character in mysql*/
2SELECT substring(myfield,2, length(myfield)-2) FROM mytable;
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,*/