在 Firebird 中,有一种方法可以在 INSERT 过程中自动更新重合行吗?

发布于 2024-09-25 10:02:40 字数 93 浏览 0 评论 0原文

如果您正在运行一个查询,该查询从另一个表中插入一组新记录,则有一种方法可以强制更新目标表中的一致 pk 记录,而无需删除记录或将进程拆分为另外两个(插入新的和更新现有的)?

if you are running a query that inserts a new set of records in a table from other one, there is a way to force the update of the coincident pk record in the destination table, without deleting records or split the process in two others (insert new and update existing)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

萌酱 2024-10-02 10:02:40

在 Firebird 2.1 中,您可以更新或插入

UPDATE OR INSERT INTO T1 (F1, F2)
    VALUES (:F1, :F2)
    MATCHING (F1);

In Firebird 2.1, you can do Update or Insert

UPDATE OR INSERT INTO T1 (F1, F2)
    VALUES (:F1, :F2)
    MATCHING (F1);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文