代码之家  ›  专栏  ›  技术社区  ›  Daniel Gustafsson

基于groupby-postgresql的订单列更新

  •  0
  • Daniel Gustafsson  · 技术社区  · 6 年前

    我已经创建了一个order列,我想更新该表中的当前值。

    CREATE TABLE public.publishroomcontacts
    (
        id integer NOT NULL DEFAULT nextval('publishroomcontacts_id_seq'::regclass),
        publishroomid integer NOT NULL,
        contactorder integer NOT NULL,
        CONSTRAINT publishroomcontacts_pkey PRIMARY KEY (id),
        CONSTRAINT fk_publishroomcontacts_publishroom_id FOREIGN KEY (publishroomid)
            REFERENCES public.publishrooms (id) MATCH SIMPLE
            ON UPDATE NO ACTION
            ON DELETE CASCADE
    )
    WITH (
        OIDS = FALSE
    );
    

    我该怎么做?

    编辑:

    enter image description here

    0 回复  |  直到 6 年前