![]() |
Hi i have a db this is two table :
location: -id -name -id_materiale NULL -quantity NULL materiale: - id - code - description I put material in location , how can iknow with a query wich material is not present in every location with a query or a model ?
Hi Pippuccio76
SELECT * FROM material WHERE id NOTIN (SELECT id_materiale FROM location) in this query, it will select first all id_material that is in a location and it will select all material that not match the provide id. Hope it help.
Forgive me i am a French Speaker (try ngatcharius on Social Network)
(08-31-2022, 10:42 AM)ngatcharius Wrote: Hi Pippuccio76 it return 0 rows , this query SELECT id_materiale FROM location return 7 record with id_material and other record with NULL ( I have recently started inserting) EDIT: It work in this way SELECT * FROM material WHERE id NOTIN (SELECT id_materiale FROM location WHERE id_materiale IS NOT NULL) |
Welcome Guest, Not a member yet? Register Sign In |