FOREIGN KEY constraint - Part II
Every was fine until this part,
Action:
ALTER TABLE sales ADD FOREIGN KEY (customer_id) REFERENCES Customers(customer_id) ON DELETE CASCADE
Message:
Error Code: 1824. Failed to open the referenced table 'customers'
Any solutions
1 answers ( 0 marked as helpful)
Hi Gonzalo!
Thanks for reaching out.
Please make sure you've created (and filled with data) the customers table, and then retry the query.
Hope this helps.
Best,
Tsvetelin