Home > Database > Mysql Tutorial > body text

What does the MySQL ELT() function return if the index number we provide as parameter is less than 1?

WBOY
Release: 2023-09-16 16:09:06
forward
1249 people have browsed it

如果我们作为参数提供的索引号小于 1,MySQL ELT() 函数会返回什么?

MySQL ELT() function will return NULL as output if the index number provided as parameter is less than: Below is an example to make it clearer -

Example

mysql> Select ELT(0,'Ram','is','a','good','boy')As Result;
+--------+
| Result |
+--------+
| NULL   |
+--------+
1 row in set (0.00 sec)

mysql> Select ELT(-1,'Ram','is','a','good','boy')As Result;
+--------+
| Result |
+--------+
| NULL   |
+--------+
1 row in set (0.04 sec)
Copy after login

As we can see, the index number in both examples above is less than 1, so MySQL returns NULL.

The above is the detailed content of What does the MySQL ELT() function return if the index number we provide as parameter is less than 1?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template