I have an column something like:
name value
John kennedy 1999
Bill gates 8388383
Obama 11110
I need an query that match 1999 if I try get john or kennedy
I tried it:
cmd.CommandText = "select value from contacts where name like @name";
cmd.Parameters.AddWithValue("@name", "%" + name);
if @name is john this returns 0 colums
if ‘@name’ is kennedy this returns 1999
put a
%on both sides of name: