The PATINDEX() function returns the position of a pattern in a string. If the pattern is not found, this function returns 0.