Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试从字段中删除空格(名称之前和之后)
SELECT TRIM(name) AS new_name FROM users;
但它什么也没做,而且当我查看 MySQL 开发页面时,查询看起来是正确的。我错过了什么吗?
也尝试过 LTRIM 和 RTRIM 但结果相同。
好的,我在每行之前和之后放置了一个点,而不是使用
SUBSTRING_INDEX
仅从结果中提取名称,这样我就得到了我需要的东西。谢谢大家的回答。