I want to add a foreign key from Table Customers, row= \"Customer ID\" to Table Pet, row= \"Customer ID\".
-- Table struct
Enterx is right.
For being able to detect not matching row :
SELECT * FROM Pet p WHERE (SELECT COUNT(*) FROM Customers c WHERE c.CustomerID=p.CustomerID)=0
Just change SELECT * by DELETE for deleting missmatching Pet entry. You can UPDATE Pet.CustomerID to NULL too. But you have to define CustomerID, from Pet table, with NULL option (and not NOT NULL)