Flash cards
Review the key moves
1/4
Core idea
What is the main idea behind MySQL INSTR() Function?
Lesson checks
Practice each idea before moving on
Short Mimo-style checks built from this lesson's code, terms, and sequence.
1Quick choice
Which statement best captures the main point of this lesson?
2Fill blank
Complete the missing token from the example code.
___ INSTR("ExampleSite.com", "3") AS MatchPosition;3Order
Put the learning moves in the order that makes the concept easiest to apply.
The INSTR() function returns the position of the first occurrence of a string in another string.
Definition and Usage
MySQL INSTR() Function
Example
SELECT INSTR("ExampleSite.com", "3") AS MatchPosition;Definition and Usage
The INSTR() function returns the position of the first occurrence of a string in another string.
This function performs a case-insensitive search.
Syntax
INSTR(
string1
,
string2
)Parameter Values
| Parameter | Description |
|---|---|
| string1 | Required. The string that will be searched |
| string2 | Required. The string to search for in string1. If string2 is not found, this function returns 0 |
Technical Details
| Works in: | From MySQL 4.0 |
|---|