站内搜索: 请输入搜索关键词

当前页面: 开发资料首页J2SE 专题SQL Server有没有返回信息?JAVA能否得到?

SQL Server有没有返回信息?JAVA能否得到?

摘要: SQL Server有没有返回信息?JAVA能否得到?


用的spring+ibatis,数据库是SQLServer。
有个疑问:在对数据库进行select、update、insert、del的操作时,数据库有没有返回一些信息?比如是对哪个表进行的什么操作。有没有什么方法能够取得这些信息?

请高手指教,谢谢!!!


有代码不?贴出来瞧瞧!


因为用的ibatis,
sql语句都写在xml里了,比如:
<select id="getAppLeasePriceInfo" resultMap="appLeasePrice" parameterClass="appTotalSearchInfo">
&lt;![CDATA[
select
count(case when f.leaseprice>=300.00 and f.leaseprice<600.00 then f.id end) as appLeasePrice1,
count(case when f.leaseprice>=600.00 and f.leaseprice<900.00 then f.id end) as appLeasePrice2,
count(case when f.leaseprice>=900.00 and f.leaseprice<1200.00 then f.id end) as appLeasePrice3,
count(case when f.leaseprice>=1200.00 then f.id end) as appLeasePrice4
]]&gt;
from familytable f



f.sectionname in ('1001','1002','1003','1004','1005','1006','1007','1008')


f.sectionname = #appSectionName#


f.userflag = #appUserFlag#


&lt;![CDATA[f.finaldate >= #appHandleDateBegin# ]]&gt;


&lt;![CDATA[f.finaldate <= #appHandleDateEnd# ]]&gt;


</select>

像这样的情况,我想在执行前拦截一下将要对哪些表的哪些列进行操作。有可能做到么?


对不起,我的问题提得不好,先结贴了。


↑返回目录
前一篇: 算法问题,求代码
后一篇: 流什么时候结束