//试了多种方式,这样写like的参数才正确 sb.Append(" and a.GOODSID like '%'+@GOODSID+'%'"); list.Add(new SqlParameter("@GOODSID", Oleno.MODEL.Basis_ware.Ware_code));