LOCATE(substr,str) : LOCATE : String Functions MySQL TUTORIALS


MySQL TUTORIALS » String Functions » LOCATE »

 

LOCATE(substr,str)


Returns 0 if substr is not in str.

mysql>
mysql> SELECT LOCATE('ABC', 'ABCABC');
+-------------------------+
| LOCATE('ABC', 'ABCABC') |
+-------------------------+
|                       |
+-------------------------+
row in set (0.00 sec)

mysql>
mysql> SELECT LOCATE('AA', 'AABBCCDD');
+--------------------------+
| LOCATE('AA', 'AABBCCDD') |
+--------------------------+
|                        |
+--------------------------+
row in set (0.00 sec)



Leave a Comment / Note


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

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo String Functions
» LOCATE