sql语句 like %?%模糊查询注意事项

String sql = "select * from users where LNAME like '%+"+lname+"%'";

//此处不可用PreparedStatement的setParam。一定要字符串拼接。

否则会报错

posted on 2014-04-05 11:34  雨停  阅读(903)  评论(0编辑  收藏  举报

导航