Table 1:
- id
- name
Table 2:
- id
- other_table_id
- table_1_id
- ..
Basically what I want to do is
Delete from table_1
where id not in (select table_1_id
from table_2
group by table_1_id);
Which should work, what I am wondering is if the sub query is the best way to do this/ is there any other way?
I prefer to use
JOINover subquery.