CREATE TABLE EMPLOYEES (
EMPLOYEE_ID NUMBER,
FIRSTNAME VARCHAR(20),
LASTNAME VARCHAR(20),
PATRONYMIC VARCHAR(20),
BIRTHDATE DATE,
MOBILENUM NUMBER(8) NOT NULL UNIQUE,
HOMENUM NUMBER(8) NOT NULL UNIQUE,
CONSTRAINT FIO_BITH UNIQUE(FIRSTNAME,LASTNAME,PATRONYMIC,BIRTHDATE)
);
ALTER TABLE EMPLOYEES
ADD CONSTRAINT EMPLOYEES_PK PRIMARY KEY(EMPLOYEE_ID);
ALTER TABLE EMPLOYEES
ADD CONSTRAINT FK_OBJECT
FOREIGN KEY(OBJECT_ID)
REFERENCES OBJECTS(OBJECT_ID);
CREATE TABLE OBJECTS (
OBJECT_ID NUMBER,
OBJECT_NAME VARCHAR(20),
OBJECT_SQUARE NUMBER(4),
OBJECT_COST NUMBER(6),
CONSTRAINT CHECK_COST_SQUARE
CHECK (OBJECT_COST > 0 AND OBJECT_SQUARE > 0)
);
ALTER TABLE OBJECTS
ADD CONSTRAINT OBECTS_PK PRIMARY KEY(OBJECT_ID);
Выдает ошибку при добавлении foreign key,что не видит таблицу objects