Relative Content

Tag Archive for javasqlmysqlspringjdbc

Read the query from .sql file

JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource); String name=”Ram”; int id=2; String sql=”select * from”+dbName+ “.Employee where name=? and id=?”; List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql, name, id); This is existing working code. I need to move the sql string to .sql file. Need to read the full query from .sql I tried this code- String path = […]