Топ-100
top of page
Волнистый абстрактный фон
CerebroSQL

ELT

База данных: MySQL

68747470733a2f2f7374796c65732e7265646469746d656469612e636f6d2f74355f32716d366b2f7374796c65

Topic

Syntax:
ELT(N,str1,str2,str3,...)

ELT() returns the Nth element of the list of strings: str1 if N = 1,
str2 if N = 2, and so on. Returns NULL if N is less than 1 or greater
than the number of arguments. ELT() is the complement of FIELD().

URL: https://dev.mysql.com/doc/refman/8.0/en/string-functions.html

Example

mysql> SELECT ELT(1, 'Aa', 'Bb', 'Cc', 'Dd');
-> 'Aa'
mysql> SELECT ELT(4, 'Aa', 'Bb', 'Cc', 'Dd');
-> 'Dd'

bottom of page