Remove leading and trailing spaces from a string:
SELECT TRIM(' SQL Tutorial ') AS TrimmedString;
Try it Yourself »
The TRIM() function removes leading and trailing spaces from a string.
TRIM(
string)
Parameter | Description |
---|---|
string | Required. The string to remove leading and trailing spaces from |
Works in: | From MySQL 4.0 |
---|
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!