What MySQL returns if the list of strings, provided as argument in FIELD() function, are NULL?
In case if all the arguments (list of strings) of FIELD() function are NULL then MySQL will return 0 as output.
Example
mysql> Select FIELD('Ram',NULL,NULL,NULL,NULL);
+----------------------------------+
| FIELD('Ram',NULL,NULL,NULL,NULL) |
+----------------------------------+
| 0 |
+----------------------------------+
1 row in set (0.00 sec)
- Related Articles
- What MySQL returns if the search string is not in the list of strings provided as argument in FIELD() function?
- What MySQL returns if the search string, provided in FIELD() function, is NULL?
- What MySQL returns if the argument of QUOTE() function is NULL?
- What MySQL ELT() function returns if the index number, provided as an argument, is higher than the number of strings?
- What MySQL EXPORT_SET() function returns if any of the argument is NULL?
- What MySQL returns if the first argument of INTERVAL() function is NULL?
- What MySQL COALESCE() function returns if all the arguments provided to it are NULL?
- What happens if a NULL argument is provided in MySQL CONV() function?
- When MySQL SUBSTRING_INDEX() function returns the same string, provided in the argument, as output?
- What MySQL ELT() function returns if we the index number, provided as an argument, is less than 1?
- What MySQL MAKE_SET() function returns if there are all NULL at the place of strings?
- What MySQL COALESCE() function returns if it has a blank, but not NULL, as the first argument?
- What MySQL returns if we use NULL, as both the arguments, as one of the argument and as a separator, in CONCAT_WS() 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 happens if we provide NULL as an argument to MySQL CHAR() function?
Kickstart Your Career
Get certified by completing the course
Get Started