position of occurrence of the string in a column sql code example Example: locate sql server SELECT CHARINDEX('b','ab') //returns 2