ORA-01745: invalid host/bind variable name
Cause: A colon in a bind variable or INTO specification was followed by an inappropriate name, perhaps a reserved word.
Action: Change the variable name and retry the operation.
简而言之,你的sql语句有错误
网上google了一下,遇到这个错误的基本都是低级失误,比如少写了一个",",比如用系统关键字做字段名,比如在ibatis里把#xx#写成了##xx##,我今天遇到的是PreparedStatement里的sql语句,select xx from table where filed1 = ?for update,“?”和for连到一起了,多打一个空格就没问题了。最诡异的是测试的时候居然没错误!
Cause: A colon in a bind variable or INTO specification was followed by an inappropriate name, perhaps a reserved word.
Action: Change the variable name and retry the operation.
简而言之,你的sql语句有错误
网上google了一下,遇到这个错误的基本都是低级失误,比如少写了一个",",比如用系统关键字做字段名,比如在ibatis里把#xx#写成了##xx##,我今天遇到的是PreparedStatement里的sql语句,select xx from table where filed1 = ?for update,“?”和for连到一起了,多打一个空格就没问题了。最诡异的是测试的时候居然没错误!