I want add foreign key like this :
ALTER TABLE prepayment_log
ADD CONSTRAINT prepayment_log_modify_id_fk
FOREIGN KEY (modify_id) REFERENCES member (user_id) ON UPDATE CASCADE;
but SQL workbench output error code [HY000][1215]
I can sure that member (user_id) is varchar(50), also prepayment_log (modify_id) is varchar(50).
I don't know what is the problem. pls...