首页 > 数据库技术 > 详细

SQL存在一个表而不在另一个表中的数据

时间:2014-08-22 17:54:09      阅读:355      评论:0      收藏:0      [点我收藏+]
select a.id,a.oacode,a.custid,a.custname,a.xsz,a.salename,a.communicationtheme,a.communicationproperty,a.communicationtime,a.productmanager,'' creator,a.creator oaCreator,a.createdate,case when a.oastate='正常结束' then 3 else 0 end status from reception_flow a 
where  (1=1)
and (a.oastate='正常结束' or a.oastate='反馈中' or a.oastate='已反馈')
and (select count(1) as num from technology_support s where s.oacode=a.oacode)=0

SQL存在一个表而不在另一个表中的数据

原文:http://blog.csdn.net/jrainbow/article/details/38758945

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!