我创建了一个表单,在其中将记录添加到子表中。但是我不希望人们能够编辑辅助键,只能从父主键列表中选择它或类似的东西。我怎么能这样做?
表格:
CREATE TABLE CHAMPIONS (CNAME VARCHAR2(15) NOT NULL, PRICELEVEL NUMBER(1) NOT NULL, ROLE VARCHAR2(10) NOT NULL, HPLEVEL NUMBER(2) NOT NULL, ATKLEVEL NUMBER(2) NOT NULL, MAGICLEVEL NUMBER(2) NOT NULL, DIFFLEVEL NUMBER(2) NOT NULL);
CREATE TABLE SKINS (SNAME VARCHAR2(20) NOT NULL, CNAME VARCHAR2(15) NOT NULL, PRICELEVEL NUMBER(1) NOT NULL);
ALTER TABLE Champions ADD CONSTRAINT pk_Champions PRIMARY KEY (CNAME);
ALTER TABLE Skins ADD CONSTRAINT fk_Skins FOREIGN KEY (CNAME) REFERENCES champions(CNAME);