elt
Description
Syntax
VARCHAR elt (INT,VARCHAR,...)
在指定的索引处返回一个字符串。如果指定的索引处没有字符串,则返回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