I have tried to reference some of the previously asked Error #1452 questions asked here but I still cannot figure out what I am doing wrong. In my movies table, I want to make actor_id an FK that references the PK in the actor table. However I keep coming up with #1452 error. Where am I going wrong?
My guess would be that you already have some data in your database that are breaking the FK constraint (ie referencing id that does not exist).
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.