sql怎么做去除重复项的操作? 50
这是一个联合查询!现在查询出来的里面有重复项出现!怎么做到只显示一条重复项数据!谢谢!我试了很多方法!做不出来!selectproofman,recordman,regi...
这是一个联合查询!现在查询出来的里面有重复项出现!怎么做到只显示一条重复项数据!谢谢!我试了很多方法!做不出来!
select proofman,recordman,registerdate,
registerman, eaid,eid,
bid, baid, bCompany, bName, bsex, bage,
bpro, bTitle, t1.bCode, bSFZ, bPhone1,
bPhone2, bEmail1, bEmail2, bAddress, bZipcode,
bCountry, bProvince, bCity, bZone, bDefine,
bPrinttime, bWWW, bDept, bGLHW, bZYPT,
bInCount, bInTime, bChecked, bDeptGF, bTitleGF,
bPrintCount, UID,t1.bfileCode , B_fax, bErCi,
staytime, bclass, blandline,
registertime=dbo.f_stryp(t2.bcode)
from t_buyer t1 left join operators t2 on t1.bCode = t2.bcode 展开
select proofman,recordman,registerdate,
registerman, eaid,eid,
bid, baid, bCompany, bName, bsex, bage,
bpro, bTitle, t1.bCode, bSFZ, bPhone1,
bPhone2, bEmail1, bEmail2, bAddress, bZipcode,
bCountry, bProvince, bCity, bZone, bDefine,
bPrinttime, bWWW, bDept, bGLHW, bZYPT,
bInCount, bInTime, bChecked, bDeptGF, bTitleGF,
bPrintCount, UID,t1.bfileCode , B_fax, bErCi,
staytime, bclass, blandline,
registertime=dbo.f_stryp(t2.bcode)
from t_buyer t1 left join operators t2 on t1.bCode = t2.bcode 展开
1个回答
展开全部
select distinct * from
(
select proofman,recordman,registerdate,
registerman, eaid,eid,
bid, baid, bCompany, bName, bsex, bage,
bpro, bTitle, t1.bCode, bSFZ, bPhone1,
bPhone2, bEmail1, bEmail2, bAddress, bZipcode,
bCountry, bProvince, bCity, bZone, bDefine,
bPrinttime, bWWW, bDept, bGLHW, bZYPT,
bInCount, bInTime, bChecked, bDeptGF, bTitleGF,
bPrintCount, UID,t1.bfileCode , B_fax, bErCi,
staytime, bclass, blandline,
registertime=dbo.f_stryp(t2.bcode)
from t_buyer t1 left join operators t2 on t1.bCode = t2.bcode
);
(
select proofman,recordman,registerdate,
registerman, eaid,eid,
bid, baid, bCompany, bName, bsex, bage,
bpro, bTitle, t1.bCode, bSFZ, bPhone1,
bPhone2, bEmail1, bEmail2, bAddress, bZipcode,
bCountry, bProvince, bCity, bZone, bDefine,
bPrinttime, bWWW, bDept, bGLHW, bZYPT,
bInCount, bInTime, bChecked, bDeptGF, bTitleGF,
bPrintCount, UID,t1.bfileCode , B_fax, bErCi,
staytime, bclass, blandline,
registertime=dbo.f_stryp(t2.bcode)
from t_buyer t1 left join operators t2 on t1.bCode = t2.bcode
);
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询