I have a table A and table B. The relationship between A and B is one to many. Now I want to make a select over all elements of A, whose primary key are NOT registered by B as a foreign key.
Select u.Id from A as u LEFT JOIN B as c ON u.id IS NULL WHERE u.active='1'
This query does not work.