- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can I manage the start position of searching in MySQL LOCATE() function?
152 Lectures 16 hours
87 Lectures 5.5 hours
As we know that by default searching in LOCATE() function starts from beginning. We can manage the start position by giving an argument to specify the position from which we want to start the search in string. Following example will demonstrate it −
mysql> Select LOCATE('good','Ram is a good boy. Is Ram a good boy?',11)As Result; +--------+ | Result | +--------+ | 29 | +--------+ 1 row in set (0.00 sec)
In the above example, we have given the value 11 as the argument for position. It means that MySQL will start searching from 11th position.
- How can I start MySQL Server?
- How LOCATE() function can be used with MySQL WHERE clause?
- What is the use of LOCATE() function in MySQL?
- How MySQL LOCATE() function is different from its synonym functions i.e. POSITION() and INSTR() functions?
- What happens if I will use integer values as arguments of MySQL LOCATE() function?
- How can I use IFNULL() function at the place of COALESCE() function in MySQL?
- How can I dynamically set the position of view in android?
- How can I determine the position of a Toplevel in Tkinter?
- How MySQL manage the behavior of a transaction?
- When MySQL LOCATE() function returns NULL as the output?
- How should I manage my life?
- How can we locate the Quiescent point of a transistor?
- How can I use another MySQL function/s with REPEAT() function?
- How can we start MySQL event scheduler?
- How can I start writing or editing for Wikipedia?