What MySQL returns if the list of strings, provided as argument in FIELD() function, are NULL?

MySQLMySQLi Database

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)
raja
Published on 20-Feb-2018 06:00:45
Advertisements