pgsql“ nextval('mgr_user_id_seq'::regclass) ,”执行时提示出错。

假行曾
  • 488

当直接执行以下脚本时会报错,报错为
[Err] ERROR: relation "mgr_user_id_seq" does not exist
完整脚本为
CREATE TABLE

mh_user
(
    id BIGINT DEFAULT nextval('mgr_user_id_seq'::regclass) NOT NULL,
    login_name CHARACTER VARYING(64) NOT NULL,
    name CHARACTER VARYING(64) NOT NULL,
    password CHARACTER VARYING(255) NOT NULL,
    PRIMARY KEY (id),
    CONSTRAINT login_name UNIQUE (login_name)
);
回复
阅读 10.9k
1 个回答

nextval('"table_id_seq"'::regclass) 这个里面有关键字之用"",外面抱一个''

宣传栏