How to insert an array in a loop to the database

前端 未结 3 1860
小蘑菇
小蘑菇 2021-01-25 03:10

I want to insert a set of arrays into a database(HANA) in a loop.My code is below:

public class jdemo {
   public static void main(String[] args) {
      Connect         


        
3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-25 04:05

    Just an idea:
    Instead of storing an array in your column, you can save a string separated by colons. When you query the data from your database, you can use split(","), and you automatically have your array that you need (after Integer.parseInt(String))

提交回复
热议问题