elt

Description

Syntax

VARCHAR elt(INT, VARCHAR,...)

Returns the string at specified index. Returns NULL if there is no string at specified index.

example

  1. mysql> select elt(1, 'aaa', 'bbb');
  2. +----------------------+
  3. | elt(1, 'aaa', 'bbb') |
  4. +----------------------+
  5. | aaa |
  6. +----------------------+
  7. mysql> select elt(2, 'aaa', 'bbb');
  8. +-----------------------+
  9. | elt(2, 'aaa', 'bbb') |
  10. +-----------------------+
  11. | bbb |
  12. +-----------------------+
  13. mysql> select elt(0, 'aaa', 'bbb');
  14. +----------------------+
  15. | elt(0, 'aaa', 'bbb') |
  16. +----------------------+
  17. | NULL |
  18. +----------------------+
  19. mysql> select elt(2, 'aaa', 'bbb');
  20. +-----------------------+
  21. | elt(3, 'aaa', 'bbb') |
  22. +-----------------------+
  23. | NULL |
  24. +-----------------------+

keywords

  1. ELT