displaying multiple records by using resultset

前端 未结 2 1139
情话喂你
情话喂你 2020-11-30 14:53

how to display multiple records from database having the same field value by using result set statement

2条回答
  •  孤独总比滥情好
    2020-11-30 15:33

    You have to create a POJO to store the data obtained via your query and then via ResultSet you can iterate each row obtained from DB Query execution.

    So you will get a List of object(POJO). This can be used wherever you want. http://java.sun.com/docs/books/tutorial/jdbc/basics/retrieving.html

    http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=2691&lngWId=2

提交回复
热议问题