why does executeUpdate return 1 even if no new row has been inserted?

前端 未结 2 1366
一生所求
一生所求 2021-01-21 08:02

here is my very simple table (Postgres):

CREATE TABLE IF NOT EXISTS PERFORMANCE.TEST
(
test text NOT NULL UNIQUE
);

if I try to insert a String

2条回答
  •  广开言路
    2021-01-21 08:20

    executeupdate is for a 'update table set column = value so on'. For insert just call execute of PreparedStatement.

提交回复
热议问题