SQL 一条记录的的两个字段值相同与不同的查询

select * from (select xm,je from table) a , (select xm01,je01 from table) b
where a.xm = b.xm01
and a.je <> b.je01

<> 或 !=



posted @ 2016-12-14 11:38  LEON.LEE  阅读(10001)  评论(0编辑  收藏  举报