ltrim

Description

Syntax

VARCHAR ltrim(VARCHAR str[, VARCHAR rhs])

When the ‘rhs’ parameter is not present, remove the continuous spaces that appear from the beginning of the ‘str’ parameter. Otherwise, remove ‘rhs’.

example

  1. mysql> SELECT ltrim(' ab d');
  2. +------------------+
  3. | ltrim(' ab d') |
  4. +------------------+
  5. | ab d |
  6. +------------------+
  7. mysql> SELECT ltrim('ababccaab','ab') str;
  8. +-------+
  9. | str |
  10. +-------+
  11. | ccaab |
  12. +-------+

keywords

  1. LTRIM