开发者

look for some function on my sql to delete space

开发者 https://www.devze.com 2023-03-12 11:10 出处:网络
2-0003-80737-11-9 when we typesome character t开发者_StackOverflow社区o mysql database some time I put space before 2 or after 9 (at the start and the end) how can i delete it on mysql I think it sh
2-0003-80737-11-9

when we type some character t开发者_StackOverflow社区o mysql database some time I put space before 2 or after 9 (at the start and the end) how can i delete it on mysql I think it should be have some function on mysql to do this ( I try to search space delete on the web )


SELECT TRIM(' test ');

should work for you...

UPDATE table SET field = TRIM(field);


You're after the TRIM function which removes both leading and trailing spaces from a string.

0

精彩评论

暂无评论...
验证码 换一张
取 消