求个sql 最好是oracle或mysql的

2024-12-23 08:04:45
推荐回答(1个)
回答1:

select id from
(select a.id,a.phone aphone,a.type,b.phone bphone from a left join b on substr(a.phone,9,8) = b.phone)
where bphone is null and id > 0;

---
以上,希望对你有所帮助。