..
The MySQL TRIM function serves to eliminate areas that may be present before and after the string passed in argument. Example:
SELECT TRIM ('mrwebmaster);
Return:
mrwebmaster
The TRIM function can also be used to remove a series of characters (other than space) before, after or both "sides" of a string. To do this we use a slightly more complex syntax based on the keywords:
SELECT TRIM (TRAILING 'x' FROM 'xxxmrwebmaster'); SELECT TRIM (LEADING 'x' FROM 'mrwebmasterxxx'); SELECT TRIM (BOTH 'x' FROM 'xxxmrwebmasterxxx');
See also functions LTRIM and RTRIM
| |
MS Access (Advanced)
Learn how to create and manage databases quickly and easily. Starting from 29 €. |
| |
MySQL (Course)
Management of open-source database. From 39 €. |
| |
SQL and Database (Course)
Create and manage relational databases. From 39 €. |