当前位置: 代码迷 >> Sql Server >> 怎样打印出PreparedStatement的完整sql?解决思路
  详细解决方案

怎样打印出PreparedStatement的完整sql?解决思路

热度:79   发布时间:2016-04-27 15:51:02.0
怎样打印出PreparedStatement的完整sql?
String   sql= "update   t_sys_dept     set   organ_id=?   ,   dept_name=?     ,   zx_h=?       where   dept_id=?   ";

怎么打印出详细的sql,有?的值的

------解决方案--------------------
除非你自己再拼一次。 否则是得不到的。
因为这种转换为 sp_executesql执行的,并不生成 那样完整的sql语句。
  相关解决方案