The registry table dependencies has a foreign key column "id" referencing ports.id. How can this query not be empty? SELECT dependencies.* FROM dependencies LEFT JOIN ports ON dependencies.id = ports.id WHERE ports.id IS null; Regards, Bradley Giesbrecht (pixilla)