MySQL TRIM() function

MySQL TRIM() function

MySQL TRIM() function



MySQL TRIM() function returns a string after removing all prefixes or suffixes from the given string.


TRIM([{BOTH | LEADING | TRAILING} [remstr] FROM ] str)

Arguments Name Description BOTH Indicates that prefixes from both left and right are to be removed. LEADING Indicates that only leading prefixes are to be removed. TRAILING Indicates that only trailing prefixes are to be removed. remstr The string to be removed. FROM Keyword str The actual string from where remstr is to be removed. Pictorial Presentation Example : MySQL TRIM() function

The following MySQL statement returns the string after removing the leading and trailing spaces from the given string ' trim '.

SELECT TRIM(' trim '); Output Example of MySQL TRIM() function to remove leading...
Прочети цялата публикация

Tози сайт използва "Бисквитки". Научи повече Приемам

Моля, запознайте се с нашите Общи условия и Политика за поверителност