gpt4 book ai didi

java - 如何将 for 语句的结果放入表中?

转载 作者:行者123 更新时间:2023-11-29 12:45:37 25 4
gpt4 key购买 nike

<分区>

for 语句的结果放入 PostgreSQL 表的最佳方法是什么?

例子:

int size = 5;
try {
for (int i = 1; i <= size; i++) {
for (int j = 1; j <= size; j++) {
??? x = (i * j);

String sql = "INSERT INTO multiplication" +
"VALUES (???)";
ResultSet rs = stmt.executeQuery(sql);
}
}
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com