当前位置:网站首页>SQL case conversion, remove the space before and after

SQL case conversion, remove the space before and after

2020-11-09 22:26:28 Game life

-- toggle case Change to lowercase

UPDATE file_selection SET mash=LOWER(mash) WHERE xxxxx = '0';

-- toggle case Capitalize

UPDATE file_selection SET mash=UPPER(mash) WHERE xxxxx = '0';

-- Remove the space in the field The space before the character

UPDATE file_selection SET mash=ltrim(mash)

-- Remove the space in the field Space after character

UPDATE file_selection SET mash=rtrim(mash)

-- Remove the space in the field Spaces in characters

UPDATE file_selection SET mash=replace(mash, ' ', '')  WHERE xxxxx = '0';

 

版权声明
本文为[Game life]所创,转载请带上原文链接,感谢