你提到你已经阅读了MSDN文章然后我真的不知道你为什么错过CHARINDEX ( expressionToFind ,expressionToSearch [ , start_location ] )
了那篇文章的这一部分。
它清楚地说明了你想知道的一切。
CHARINDEX ( expressionToFind ,expressionToSearch [ , start_location ]
表达式查找
Is a character expression that contains the sequence to be found. expressionToFind is limited to 8000 characters.
表达式搜索
Is a character expression to be searched.
开始位置
Is an integer or bigint expression at which the search starts.
If start_location is not specified(It's OPTIONAL PARAMETER),
is a negative number, or is 0,
the search starts at the beginning of expressionToSearch.