java中 基于preparestatement 的 oracle 模糊查询

sql = "select * from MOVIES where n_flag=? and v_name like ?"; PreparedStatement pst=conn.prepareStatement(sql); pst.setInt(1, flag); pst.setString(2, "%" + v_name + "%");

你可能感兴趣的:(java,oracle,sql)