I have two tables:
produtos
- id_produto
valores
- id_produto
id_produto
would be a column, same for both tables.
I need to delete records from the values table, but only those that are NOT also in the products table.
Ex:
I have two products registered, and in the Values table I have the ID of these two products. For some reason I deleted a product from the products table, but it was kept in the values table.
I want to turn off this registry.
How can I do this?