select * from (select xm,je from table) a , (select xm01,je01 from table) bwhere a.xm = b.xm01and a.je <> b.je01<> 或 !=