
- 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 MySQL ELT() function returns if the index number, provided as an argument, is higher than the number of strings?
MySQL ELT() function returns NULL as output if the index number provided as argument is higher than the number of strings. Following is an example to make it clearer −
Example
mysql> Select ELT(6,'Ram','is','a','good','boy')As Result; +--------+ | Result | +--------+ | NULL | +--------+ 1 row in set (0.00 sec)
As we can see that index number is 6 and the list of strings is having only 5 strings. Hence MySQL returns NULL.
- Related Articles
- What MySQL ELT() function returns if we the index number, provided as an argument, is less than 1?
- What would be the output of MySQL ELT() function if the index number, provided as an argument, is not an integer?
- What MySQL returns if the list of strings, provided as argument in FIELD() function, are NULL?
- What MySQL returns if the search string is not in the list of strings provided as argument in FIELD() function?
- What MYSQL INTERVAL() function returns if there is no bigger number in the list of arguments than the number at first argument?
- What MySQL returns if I provide a non-hexadecimal number as an argument to UNHEX() function?
- When MySQL SUBSTRING_INDEX() function returns the same string, provided in the argument, as output?
- What MySQL returns if the argument of QUOTE() function is NULL?
- What MySQL returns if we provide value larger than 255 as argument to MySQL CHAR() function?
- What MySQL returns if the first argument of INTERVAL() function is NULL?
- What MySQL EXPORT_SET() function returns if any of the argument is NULL?
- What MySQL returns if the search string, provided in FIELD() function, is NULL?
- What MySQL returns on passing an invalid string as an argument to STR_TO_DATE() function?
- What MySQL returns, if the length of the original string is greater than the length specified as an argument in LPAD() or RPAD() functions?
- What happens if a NULL argument is provided in MySQL CONV() function?

Advertisements