SELECT * FROM bigdata.GLR_B_ORG_INFO where
(org_cd=(select org_cd from bigdata.GLR_B_ORG_INFO where org_id= '${参数}')
or
parent_org_cd =(select org_cd from bigdata.GLR_B_ORG_INFO
where org_id='${参数}')) 注释:WHERE 后面加个判断 当a=1的时候正常执行 上面的where 后面条件 当a=2的时候 让 org_cd='101021011' OR parent_org_cd='101000001' |