if(${OA}==0,select 1 from dump,select 0 from dump)怎么判断当参数选折1的时候,用第一个sql语句,否则用第二个,
${if(OA=0,"select 1 from dump","select 0 from dump")}
用公式的if可以拼接sql,但是如果有参数的话后面拼接比较麻烦。可以直接用数据库的if去写
${if(oa='1',"select dt from R_0901","select va from R_0901")}