怎么做组合查询请交格位大神, 想这种的组合查询怎么做在[解决办法]String sql select * from table t w
怎么做组合查询
请交格位大神, 想这种的组合查询怎么做在 [解决办法]
String sql = "select * from table t where 1=1 "; if(部门!=null&&!部门.equals("")){ sql += " and t.部门 = " + 部门; //记得varchar加单引号:" and t.部门 = '" + 部门+"'"; } if 性别 .... if ...