Check Table For Any Oprhaned Records
select count(*)
from books
left join authors
on books.author_id = authors.id
where authors.id is null
and books.author_id is not null;Last updated
select count(*)
from books
left join authors
on books.author_id = authors.id
where authors.id is null
and books.author_id is not null;Last updated