bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

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

ParameterDescription
string1Required. The string that will be searched
string2Required. The string to search for in string1. If string2 is not found, this function returns 0

Technical Details

Works in:From MySQL 4.0

Previous

MySQL INSERT() Function

Next

MySQL LCASE() Function