当前位置: 代码迷 >> DB2 >> 问个SQL语句,答者有分,该怎么解决
  详细解决方案

问个SQL语句,答者有分,该怎么解决

热度:2276   发布时间:2013-02-26 00:00:00.0
问个SQL语句,答者有分
我现在有一张表updateinfo   里面两个字段bh   oldbh   现在要找出hb和oldbh里面记录不同的全部记录,这个语句怎么写?

------解决方案--------------------------------------------------------
select * form updateinfo where bh not in(select oldbh from updateinfo)
------解决方案--------------------------------------------------------
select * from updateinfo where bh != oldbh
  相关解决方案