帮我看一下这条语句吧 谢谢了 为啥提示“单行子查询返回多个行”
select*fromBD_T_FC_YBZWWS_YDCLwhereBD_T_FC_YBZWWS_YDCL.Ywzh!=(selectBD_T_FC_YBZWWS_YD...
select * from BD_T_FC_YBZWWS_YDCL where
BD_T_FC_YBZWWS_YDCL.Ywzh!=(
select BD_T_FC_YBZWWS_YDCL.YWZH from BD_T_FC_YBZWWS_YDCL inner join fgj_t_dj_fcjy
on bd_t_fc_ybzwws_ydcl.ywzh=fgj_t_dj_fcjy.ywzh inner join ZGXT_T_SB_QSJMTJ
on fgj_t_dj_fcjy.fwzl=zgxt_t_sb_qsjmtj.jmfwdz
where bd_t_fc_ybzwws_ydcl.ydlx =2) 展开
BD_T_FC_YBZWWS_YDCL.Ywzh!=(
select BD_T_FC_YBZWWS_YDCL.YWZH from BD_T_FC_YBZWWS_YDCL inner join fgj_t_dj_fcjy
on bd_t_fc_ybzwws_ydcl.ywzh=fgj_t_dj_fcjy.ywzh inner join ZGXT_T_SB_QSJMTJ
on fgj_t_dj_fcjy.fwzl=zgxt_t_sb_qsjmtj.jmfwdz
where bd_t_fc_ybzwws_ydcl.ydlx =2) 展开
1个回答
展开全部
你把语句改为:
select * from BD_T_FC_YBZWWS_YDCL where
BD_T_FC_YBZWWS_YDCL.Ywzh not in (
select BD_T_FC_YBZWWS_YDCL.YWZH from BD_T_FC_YBZWWS_YDCL inner join fgj_t_dj_fcjy
on bd_t_fc_ybzwws_ydcl.ywzh=fgj_t_dj_fcjy.ywzh inner join ZGXT_T_SB_QSJMTJ
on fgj_t_dj_fcjy.fwzl=zgxt_t_sb_qsjmtj.jmfwdz
where bd_t_fc_ybzwws_ydcl.ydlx =2);
你就知道为什么会返回多个行了!
select * from BD_T_FC_YBZWWS_YDCL where
BD_T_FC_YBZWWS_YDCL.Ywzh not in (
select BD_T_FC_YBZWWS_YDCL.YWZH from BD_T_FC_YBZWWS_YDCL inner join fgj_t_dj_fcjy
on bd_t_fc_ybzwws_ydcl.ywzh=fgj_t_dj_fcjy.ywzh inner join ZGXT_T_SB_QSJMTJ
on fgj_t_dj_fcjy.fwzl=zgxt_t_sb_qsjmtj.jmfwdz
where bd_t_fc_ybzwws_ydcl.ydlx =2);
你就知道为什么会返回多个行了!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询