my foreign key columns takes values which are not present in the parent table. Why so?
Engine for both the tables are Innodb.
code used for foreign key creation. ALTER TABLE test ADD CONSTRAINT FK_PersonOrder FOREIGN KEY (UserId) REFERENCES tbluser(UserID) ON DELETE CASCADE ON UPDATE CASCADE;
insert test values (2222222);
2222222 isn't there in the tbluser table.