i inserted some foreign key but this one not work.
i inserted another foreign key in this table.
alter table ROOM
add constraint FK_ROOM_REFERENCE_USER foreign key (USERID)
references "USER" (USERID)
on update cascade
on delete cascade;
the error is :
Msg 1785, Level 16, State 0, Line 1
Introducing FOREIGN KEY constraint 'FK_ROOM_REFERENCE_USER' on table 'ROOM' may cause cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE NO ACTION, or modify other FOREIGN KEY constraints.
Msg 1750, Level 16, State 0, Line 1
Could not create constraint or index. See previous errors.
when i put it no action it will be work
but on cascade no!
What I have tried:
i inserted all of tables and foreign key but two foreign key not inserted.
in room table i have 3 foreign key.
one of them inserted.
two number of my code not working that one of them i wrote up.
what should i do?