VeloDB Cloud
SQL Manual
Functions
string-functions
elt

elt

Description

Syntax:

VARCHAR elt (INT,VARCHAR,...)

This function returns the string at the specified index. If there is no string at the specified index, it will return NULL.

Example

mysql> select elt(1, 'aaa', 'bbb');
+----------------------+
| elt(1, 'aaa', 'bbb') |
+----------------------+
| aaa                  |
+----------------------+
mysql> select elt(2, 'aaa', 'bbb');
+-----------------------+
| elt(2, 'aaa', 'bbb')  |
+-----------------------+
| bbb                   |
+-----------------------+
mysql> select elt(0, 'aaa', 'bbb');
+----------------------+
| elt(0, 'aaa', 'bbb') |
+----------------------+
| NULL                 |
+----------------------+
mysql> select elt(2, 'aaa', 'bbb');
+-----------------------+
| elt(3, 'aaa', 'bbb')  |
+-----------------------+
| NULL                  |
+-----------------------+

Keywords

ELT