Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
What would be the output of MySQL ELT() function if the index number, provided as an argument, is not an integer?
As we know the 1st argument of ELT() function must be an integer value but when we provide index number which is not an integer the MySQL ELT() function returns NULL with a warning.
Example
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) Advertisements
