I have created a simple users table which is having userid and username(unique).
Created another table units, this table contains cratedby which i want to record username in users table. I created a foreign key field. createdby with username in users. Its done without any issue.
Now I created another table customers1 which is also having a field cratedby(one of the username). When I am establishing foreign key relation its throwing an error - foreign key constaint is incorrectly formed.
There is no data in any of the tables. Why its working incase of units table not in customers1 table. I am uploading 3 images.
Please help... I read similar questions tried several options, but did not work. 3 Tables, HeidiSQL