我想写这么句sql,insert into table(a,....) values( select b from table_b where c='xx',....)
现在在ibatis里,
我在xml文件里这么写
insert into table(a,....) values( select b from table_b where c=#property#,....)
property是ClassA的一个属性,但是执行报错,ORA-00936: missing expression,
看ibatis生成的sql是
[color=red][preparestatement]: insert into table(a,....) values( ?,....) [/color]
然后在?处绑定的是select b from table_b where c='xx'
但我要的效果是
[color=red][preparestatement]: insert into table(a,....) values( select b from table_b where c=?,....)[/color]
接触ibatis不久,不知道问题有没有说清楚,希望各位帮忙说下这个应该怎么写。
p.s.用的是ibatis2.3