repeat

Description

Syntax

‘VARCHAR repeat (VARCHAR str, INT count)

Repeat the str of the string count times, return empty string when count is less than 1, return NULL when str, count is any NULL

example

  1. mysql> SELECT repeat("a", 3);
  2. +----------------+
  3. | repeat('a', 3) |
  4. +----------------+
  5. | aaa |
  6. +----------------+
  7. mysql> SELECT repeat("a", -1);
  8. +-----------------+
  9. | repeat('a', -1) |
  10. +-----------------+
  11. | |
  12. +-----------------+

keyword REPEAT,