sql select from table where id does not exists in another code example
Example: sql select where id not exists in another table
where ID not in(select ID from T2 where HISTORY_FLG!=1)
where ID not in(select ID from T2 where HISTORY_FLG!=1)