In response to
"TFW you send 60 minutes wrestling with a SQL query and you're still not even sure why it works now (geek overload)"
by
oblique
|
on the first one your join is on id to parent_id. "where id not in [parent_id's]". And wouldn't a left join work?
Posted by
JaxSean (aka JaxSean)
Nov 5 '21, 08:03
|
select
*
from
table t
left join othertable ot
on ot.id = t.id
where
ot.id is null
That should give you everything from table where the ID is not set
|
Responses:
|