CHARINDEX

Use CHARINDEX to search a character string expression for a specified string. The result is the position number of the string in the original expression.

Syntax

CHARINDEX(string_to_find, string_to_search, starting_position)

Example

Result: 10

SELECT CHARINDEX('team','baseball team')