db2 根据一个字段查询数据,这个字段相同的只显示一条数据
selecta.custid,a.begindate,a.custname,a.paperkind,a.paperid,a.sexsign,a.age,a.MarrSig...
select
a.custid,
a.begindate,
a.custname,
a.paperkind,
a.paperid,
a.sexsign,
a.age,
a.MarrSign,
a.EducSign,
a.HouseTel,
a.mobile,
a.worktel,
a.EMail,
a.ZzAddr,
a.ZzPost,
a.HKAddr,
from (select loanid, custid, begindate, custname, paperkind, paperid, sexsign, age,
MarrSign, EducSign, HouseTel, mobile, worktel, EMail, ZzAddr, ZzPost, HKAddr
from dbsmalbusiaccp a where 1=1 and
a.APPRSTATE NOT IN ('04','21','22','16','23','24') ) a
上面这条语句怎么让一个custid只有查询出一条数据 展开
a.custid,
a.begindate,
a.custname,
a.paperkind,
a.paperid,
a.sexsign,
a.age,
a.MarrSign,
a.EducSign,
a.HouseTel,
a.mobile,
a.worktel,
a.EMail,
a.ZzAddr,
a.ZzPost,
a.HKAddr,
from (select loanid, custid, begindate, custname, paperkind, paperid, sexsign, age,
MarrSign, EducSign, HouseTel, mobile, worktel, EMail, ZzAddr, ZzPost, HKAddr
from dbsmalbusiaccp a where 1=1 and
a.APPRSTATE NOT IN ('04','21','22','16','23','24') ) a
上面这条语句怎么让一个custid只有查询出一条数据 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询