Why is While (rs.next()) statement ending after 1st iteration?

后端 未结 4 1067
花落未央
花落未央 2021-01-20 03:20

I am using a SELECT statement to get data from a table and then insert it into another table. However the line \"stmt.executeQuery(query);\" is inserting the first line fro

4条回答
  •  粉色の甜心
    2021-01-20 03:56

    if you use the same statement, it will invalidate the previous result set. You should use a different statement to perform updates/inserts.

提交回复
热议问题