数据,只保留a表和b表中都存在的数据?可以使用INNER JOIN替换RIGHT JOIN来实现:

SELECT a.billinguploadstate, a.setl_id, b.setl_id FROM fin_si_setlinfo a INNER JOIN LSB b ON a.setl_id = b.setl_id AND a.mdtrt_id = b.mdtrt_id;

SELECT abillinguploadstateasetl_idbsetl_id from fin_si_setlinfo a RIGHT JOIN LSB b ON asetl_id=bsetl_id AND amdtrt_id=bmdtrt_id;如何修改以上语句排除a表里没有b表里有的

原文地址: https://www.cveoy.top/t/topic/bRww 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录