gpt4 book ai didi

根据更新请求插入 Java

转载 作者:行者123 更新时间:2023-11-30 22:45:44 26 4
gpt4 key购买 nike

在我的应用程序中,我发出了更新请求,但它在表中添加了一个新条目。

有要求:

UPDATE t_utilisateurs SET txt_courriel = ?, char_password = ?, txt_nom_utilisateur = ?, txt_prenom_utilisateur = ?, txt_adresse = ?, txt_ville = ?, txt_code_postal = ?, bigint_telephone = ?, bigint_cellulaire = ?, date_debut = ?, date_fin = ?, int_acces = ?, fk_departement = ? WHERE pk_utilisateur = ?

我不明白为什么它会创建一个新条目而不是更新所选条目。

最佳答案

我猜测数据库中不存在 where 子句 (pk_utilisateur) 中的值,并且在这种情况下更新默认为插入。

关于根据更新请求插入 Java,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29657127/

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