------解决方案-------------------- 用not in 或者 no exists
------解决方案-------------------- 用distinct 生成code的list,然后在你列举中剔除刚才查询出来的值。
------解决方案-------------------- not in
------解决方案--------------------
select a.code from
(
select code1 code
union
select code2 code
union
select code3 code
union
select code4 code
union
select code5 code
union
select code6 code
) as a
where
a.code not in (select distinct code from T)