title: How to delete records from table with like condition using Spring JDBC template update?
body: <p>I am trying to delete some rows from a table using JDBC template and Oracle.
  I could not figure out how to delete with like condition. 
  How do we pass parameters inside like condition?</p>
  
  <p>I tried the below:</p>
  
  <pre><code>this.jdbcTemplate.update("delete from logs l where l.message like '%" + ":studentId" + "%'" ,new MapSqlParameterSource("studentId", studentIds[i]));
  </code></pre>
  
  <p>This code is written inside a for loop which should apply the delete statement for the every studentId inside studentIds array. It does not throw an error, but it also does not work.</p>
  
  <p>In the debug log it says:
  <em>Executing prepared SQL statement [delete from logs l where l.message like '%:studentId%']</em></p>
  
  <p>Where as for a successfully executed statement debug log says:
  <em>Executing prepared SQL statement [update students m set m.student_deleted='Y' where m.student_id = ? ]</em></p>
  
  <p>Here it puts "?" instead of my parameter.
  I think it must be something like this for the statement with the like condition also. But instead it puts %:studentId%</p>
  
  <p>What is the correct way of doing this, thanks in advance.</p>