Check If A String in Sql
SQL provide CHARINDEX() function Or LIKE Predicate to check if the string contains a specific substring
Method 1 - Using CHARINDEX() function
used to find a certain word or substring within a larger text and returns the first match it found.
It will return 0 if no words are detected (zero).
Method 2 - Using LIKE Predicate
You can search within a string or content for a substring using the LIKE predicate operator.
To find one additional character and one character, respectively, the LIKE operator is coupled with % and (underscore).
The % operator can be used to locate a substring.
The WHERE clause of SELECT, UPDATE, and DELETE queries can also use this LIKE technique.