THX
答案 0 :(得分:0)
如果格式一致(即表A中ID的前8个字符等于表B中的ID),则可以使用前8个字符加入:
select
table_a.id as table_a_id,
case when table_b.id is null then 'Missing' else 'Not missing' end as status
from table_a
left outer join table_b
on substr(table_a.id, 1, 8) = table_b.id