select a,b,c
<isNotNull property="pc">
,cName
</isNotNull>
from atable
where a = #pa#
<isNotNull prepend="and" property="pc">
c = #pc#
</isNotNull>
pc为空时 ,select 出来 a b c 三个字段pc不为空时,还是 select出来 a b c 三个字段, ibatis 生成的 sql 中是有 cName 的