使用sql语句动态拼接where条件,条件中包含 or
问题相关代码,请勿粘贴截图select * from dict where 单位编码 IN ('10206') and ver='510' and substr(日期, 1, 7) between '2016-01' and '2035-12' and formula_id='首发集团合并快报' OR ( 单位编码 IN ('10210') and ver='510' and substr(日期, 1, 7) between '2016-01' and '2035-12' and formula_id='首发集团合并快报')
我想要达到的结果where 后面的筛选条件需要通过sql查询数据表获得,怎么将SQL拼接到where 后面
欢迎光临 永洪社区 (https://club.yonghongtech.com/) | Powered by Discuz! X3.4 |