当前位置:   article > 正文

mysql 去掉字段前后的空格_mysql去掉字段前后空格

mysql去掉字段前后空格

左边
UPDATE fenlei_shipin SET type_name=LTRIM(type_name)
全部
UPDATE fenlei_shipin SET type_name=TRIM(type_name)
右边
UPDATE fenlei_shipin SET type_name=RTRIM(type_name)

更新截取数值
UPDATE book_info SET file_path = (SELECT SUBSTRING(file_path, 1, LENGTH(file_path)-4)) WHERE type =2 AND file_path LIKE ‘%.mp4%’

UPDATE book_info SET file_path = CONCAT(file_path,".pdf") WHERE id = 803

去除\r\n
查询\r\n
SELECT *FROM data_tree WHERE name LIKE ‘%\r\n%’;

去掉\r\n
UPDATE data_tree SET name = REPLACE( REPLACE( name , CHAR( 10 ) , ‘’ ) , CHAR( 13 ) , ‘’ )

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小丑西瓜9/article/detail/297038
推荐阅读
相关标签
  

闽ICP备14008679号