• 2022-05-28
    为salerecord表GID字段添加外键,引用goods表中GID字段。
    A: ALTER TABLE salerecord ADD CONSTRAINT pk2 PRIMARY KEY(GID) REFERENCES goods(GID);
    B: ALTER TABLE salerecord ADD CONSTRAINT fk2 FOREIGN KEY(GID) REFERENCES goods(GID);
    C: ALTER TABLE salerecord ADD CONSTRAINT fk2 FOREIGN KEY(CID) REFERENCES goods(CID);
    D: ALTER TABLE salerecord ADD CONSTRAINT pk2 PRIMARY KEY(CID) REFERENCES goods(CID);
  • 举一反三