Announcement Announcement Module
No announcement yet.
Spring Jdbctemplate query Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Jdbctemplate query

    Hello All,
    I have a code that we are planning to re-write using jdbc template. Here are few more details about the query that I'm planning to re-write.
    The query is a dynamic one. Something like the below,
    for(int i=0;i<list.size();i++){
    String userid=list.get(i);
    String query=SELECT account_type,email_id from account where user_id=userid;
    Now, this will return a result set. What option should i use to get the maximum benefit from jdbc template?
    Other important points to note are,
    1. Some userid's won't be returning any result,
    2. There can be multiple account type and emailid for a particular user id.

    Right now, i'm using SQLRowset of jdbc template.

    Could any one provide their suggestion on which is the best available option ? or can i go ahead with the sqlRowset?