Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

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,*/
 
PREVIOUS NEXT
Tagged: #mysql #remove #character #string
ADD COMMENT
Topic
Name
4+6 =