As we know, the first parameter of the ELT() function must be an integer value, but when the index number we provide is not an integer, MySQL's ELT() function will Return NULL and display a warning.
mysql> select ELT('one','Ram,is,good,boy')As Result; +--------+ | Result | +--------+ | NULL | +--------+ 1 row in set, 1 warning (0.00 sec) mysql> Show Warnings; +---------+------+------------------------------------------+ | Level | Code | Message | +---------+------+------------------------------------------+ | Warning | 1292 | Truncated incorrect INTEGER value: 'one' | +---------+------+------------------------------------------+ 1 row in set (0.00 sec)
The above is the detailed content of What is the output of the MySQL ELT() function if the index number supplied as a parameter is not an integer?. For more information, please follow other related articles on the PHP Chinese website!