I needed to do this just recently and came up with the following solution (uses Spring JDBC)
String sql = "select * from clobtest where dbms_lob.instr(myclob, ? , 1, 1) > 0"; return (String) getSimpleJdbcTemplate().getJdbcOperations().queryForObject(sql, new RowMapper<Object>() { public String mapRow(ResultSet rs, int rowNum) throws SQLException { String clobText = lobHandler.getClobAsString(rs, "myclob"); return clobText; } }, searchText);
Everything seems to be working fine, but I'm going to do some performance testing to see how well it works on boot.
Bencourliss
source share