Created 9 fields in the table; only 7 are visible; foreign keys are not displayed. Created a table like this:

CREATE TABLE List_Worker( code Number(10) NOT NULL, fam varchar2(55) NOT NULL, im varchar2(55) NOT NULL, otc varchar2(55) NOT NULL, birthDay TIMESTAMP DEFAULT SYSTIMESTAMP, workDay TIMESTAMP DEFAULT SYSTIMESTAMP, CONSTRAINT code_pk2 PRIMARY KEY (code), CONSTRAINT fk_codeDep FOREIGN KEY (code) REFERENCES List_Department(code), CONSTRAINT fk_codePos FOREIGN KEY (code) REFERENCES List_Position(code), firing char(1) CHECK (firing IN ('1', '2')) 

);

Here is the table:

enter image description here

How to make foreign keys appear?

  • Foreign keys are not fields, they will never be displayed as separate columns. You have only the code field and there can be only one value in it. But the fact that it refers to 2 tables at once is very strange. This means that you can put in this field only the value that is in both tables specified in the keys - Mike
  • Those. when filling the table, should I ignore these fields and work only with those who are displayed? - Alexander
  • one
    I repeat, these are not fields, they cannot be filled. These are restrictions for the code field, in which you will not be able to put anything now - Mike
  • one
    You have already made the code field in your table with a foreign key, and at the same time two foreign keys. Imagine you have 5 boxes. And there is a requirement not to put matches with red heads in the first box. So the boxes are fields. And the requirement not to put something defined in one of them is a foreign key. - Mike
  • one
    I suddenly realized what your problem is, you still have an idea about why the key is needed, just expect that the field providing the link will be created by itself. So, no, it will not create itself, declare for example dept_code number(10), and a separate line CONSTRAINT fk_codeDep FOREIGN KEY (dept_code) REFERENCES List_Department(code), - Mike

0