ALTER TABLE sales_details ADD FOREIGN KEY fk_product_code(product_code) REFERENCES products(product_code) ON DELETE CASCADE;