I want to ask a question about the SQL. I have the following table.
Name Phone
a 1
b 2
c 3
d 4
e 5
I have an ArrayList(java) which contains the [a,b,c,d,e]. Is it possible to put the ArrayList into the mySQL statement to retrieve the all the phone numbers? Thank you.
You could create an IN clause for all the names and map the result set to your data:
I’m sure there are already libraries that do the needed work for you. You could start at http://www.hibernate.org/ with your research.