
- Learn MySQL
- MySQL - Home
- MySQL - Introduction
- MySQL - Installation
- MySQL - Administration
- MySQL - PHP Syntax
- MySQL - Connection
- MySQL - Create Database
- MySQL - Drop Database
- MySQL - Select Database
- MySQL - Data Types
- MySQL - Create Tables
- MySQL - Drop Tables
- MySQL - Insert Query
- MySQL - Select Query
- MySQL - Where Clause
- MySQL - Update Query
- MySQL - Delete Query
- MySQL - Like Clause
- MySQL - Sorting Results
- MySQL - Using Join
- MySQL - NULL Values
- MySQL - Regexps
- MySQL - Transactions
- MySQL - Alter Command
- MySQL - Indexes
- MySQL - Temporary Tables
- MySQL - Clone Tables
- MySQL - Database Info
- MySQL - Using Sequences
- MySQL - Handling Duplicates
- MySQL - SQL Injection
- MySQL - Database Export
- MySQL - Database Import
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)
- Related Articles
- What MySQL ELT() function returns if the index number, provided as an argument, is higher than the number of strings?
- What MySQL ELT() function returns if we the index number, provided as an argument, is less than 1?
- When MySQL SUBSTRING_INDEX() function returns the same string, provided in the argument, as output?
- What would be the output of MySQL SUM() function if a column having no values has been passed as its argument?
- What MySQL returns if the search string is not in the list of strings provided as argument in FIELD() function?
- What is MySQL STRCMP() function and what would be the output of this function?
- What MySQL returns if the list of strings, provided as argument in FIELD() function, are NULL?
- What would be effect of negative value of second argument, which specifies the number of decimal places, on the output of MySQL ROUND() function?
- What would be effect of negative value of second argument, which specifies the number of decimal places, on the output of MySQL TRUNCATE() function?
- What happens if a NULL argument is provided in MySQL CONV() function?
- What would be the effect on MySQL output if we have the combination of NULL and other values in the list of strings, provided as arguments in FIELD() function?
- What MySQL returns if I provide a non-hexadecimal number as an argument to UNHEX() function?
- What happens if we provide NULL as an argument to MySQL CHAR() function?
- What is MySQL ELT() function?
- How can I use a SELECT statement as an argument of MySQL IF() function?

Advertisements