i am trying to create a second table linked to the one i have just created name Company when i try to add a Foreign Key it doesnt let me

CREATE TABLE Weapons (
    id NUMBER(11),
    name VARCHAR2(20),
    damage NUMBER(20),
    company_id NUMBER(11),
    CONSTRAINT pk_Weapons PRIMARY KEY(id),
    CONSTRAINT fk_Weapons_company FOREIGN KEY(company_id) REFERENCES Company(id),
    );

0 Answers