FIELD(str,str1,str2,str3,...) : FIELD : String Functions MySQL TUTORIALS


MySQL TUTORIALS » String Functions » FIELD »

 

FIELD(str,str1,str2,str3,...)


Returns 0 if str is not found.

If str is NULL, the return value is 0.

FIELD() is the complement of ELT().

mysql>
mysql> SELECT FIELD('A''B''A''V''D''W');
+-------------------------------------+
| FIELD('A''B''A''V''D''W'|
+-------------------------------------+
|                                   |
+-------------------------------------+
row in set (0.00 sec)

mysql>
mysql>
mysql> SELECT FIELD('Z''A''B''C''D''E');
+-------------------------------------+
| FIELD('Z''A''B''C''D''E'|
+-------------------------------------+
|                                   |
+-------------------------------------+
row in set (0.02 sec)

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo String Functions
» FIELD