经典sql语句写法,值得借鉴

来源:互联网 发布:mac 查看系统版本 编辑:程序博客网 时间:2024/04/30 21:23

  public List getFwxList(String title){

 

          String sql = "select * from fwxx where 1 = 1";

 

          if(null != title && ! title.trim().equals("") ){

 

                   sql += "and title like '%" + title + "%' ";

          }

 

  }

原创粉丝点击