sql模糊查询怎么把多个字段一起查询?

2024-12-04 05:01:46
推荐回答(2个)
回答1:

... where (CustomerName like '%"+TextBox1.Text+"%' or ID like '%"+TextBox1.Text+"%' or CellPhone like '%"+TextBox1.Text+"%')";

回答2:

string.format(”…… where CustomerName like '{0}' or ID like '{0}' or CellPhone like '{0}'“,TextBox1.Text)