I have an SQL query as below.
Select * from table where name like \'%\' + search_criteria + \'%\'
If search_criteria = \'abc\', it will r
The easiest solution is to dispense with "like" altogether:
Select * from table where charindex(search_criteria, name) > 0
I prefer charindex over like. Historically, it had better performance, but I'm not sure if it makes much of difference now.