日期:2014-05-18  浏览次数:20358 次

子查询学习中,请指教!
select a.CIFNm,b.c,b.d from OPSInf a where a.CIFNm exists (select 1 from CIFNm b where a.CIFNm=b.CIFNm)

意思是查询出!

------解决方案--------------------
SQL code

--有那么复杂吗?
SELECT  a.CIFNm,b.c,b.d  FROM OPSInf a,CIFNm b WHERE a.CIFNm=b.CIFNm

------解决方案--------------------
SQL code

select a.CIFNm,b.c,b.d 
from OPSInf a 
join OPSInf b
on  a.CIFNm=b.CIFNm