orecal in trim

trim are generally used to delete the spaces on both sides of the string. In fact, the TRIM may also be used to delete the specified string of characters on both sides. And trim delete the specified string can only be a single character. The  TRIM ( ' character 1' from ' string 2')  , a character can be a single character.
1. trim ()
remove spaces on either side of the string.
2. ltrim ()
deletes a string of spaces left.
3. rtrim ()
to remove spaces to the right of the string.
4. trim ( '
character 1' from ' string 2')   , respectively, from the character two sides start of the string, to delete the specified character 1 .
5. trim ([leading | trailing |
both] trim_char from string)  from string String to delete characters specified in trim_char .
  leading:
to start deleting from the head string.
  trailing:
start the removal from the end of the string.
  borth:
Delete from both sides of the string.
6. tim ()
can only remove an en space. 

For example:

trim('   tech   ')  would return 'tech';

trim(' '  from  '   tech   ')         would return 'tech';

trim(leading '0' from '000123')      would return '123';

trim(trailing '1' from 'Tech1') would return 'Tech';

trim(both '1' from '123Tech111')    would return '23Tech';

Published 27 original articles · won praise 12 · views 10000 +

Guess you like

Origin blog.csdn.net/u013297345/article/details/17613603