I want to perform a small SQL server search in my ASP.NET web project. My database is not big so I think it's better not to use full-text-search.
I want to perform a simple search like this:
select * from mytable where columnA LIKE '%something%'
I can use =
in the following way:
select * from mytable where columnA='"+myVariable+"'
but how can I use a variable instead of %something%
in the LIKE phrase?
Is this correct:
LIKE '"+%myVariable%+"'
?