Navigation

    MemFireDB论坛

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    插入数据表时报错409错误,提示:“duplicate key value violates unique constraint

    MemFireDB用户问答
    2
    2
    11
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Y
      yyy last edited by

      您好,创建一张数据表,调用接口插入数据是报错:
      70213e45-382e-44d5-8580-b43b798f97dd-image.png
      该如何处理呢?

      M 1 Reply Last reply Reply Quote 0
      • M
        MemFireDB Robot @yyy last edited by

        @yyy 这里的报错为主键重复,可以通过将列数据类型定义为 SERIAL 来创建数据库表,用于定义表的某一列为自增列
        具体参考:https://community.memfiredb.com/topic/545/小技巧-postgresql创建表字段自增的方法1

        1 Reply Last reply Reply Quote 0
        • First post
          Last post