
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
MySQL LOCATE Function Returns NULL Output
It will return NULL as the output when the value of either first argument i.e. substring or the value of second argument i.e. substring is NULL. Example below will demonstrate it −
Example
mysql> Select LOCATE(NULL,'Ram is a good boy')As Result; +--------+ | Result | +--------+ | NULL | +--------+ 1 row in set (0.00 sec) mysql> Select LOCATE('Ram',NULL)As Result; +--------+ | Result | +--------+ | NULL | +--------+ 1 row in set (0.00 sec)
Advertisements