除外:
oracle没有except这个关键字,这个关键字属于sqlserver
,在oracle里,他叫minus,与except是一个意思。
select a.code OrgId, b.code AppId from NSTM_ORGANIZATION a left join NSTM_SYSTEM b on a.id=b.org_id where a.code='01' and b.code<>'HIP0104' minus select a.code OrgId, b.code AppId from NSTM_ORGANIZATION a left join NSTM_SYSTEM b on a.id=b.org_id where b.id='3'