Menu
I have two tables, a main table with data and indexed by and ID.
I have a second table, which has this id and another linking the two.
I want to find rows in my main table that aren’t in my linking second table. Essentially orphan rows.
I thought maybe like this but doesn’t work. Any ideas?
“`SELECT m.ID, COUNT(l.ID) FROM `mainTable` m JOIN `linkingTable` l ON m.ID = l.ID