如何使用 JDBC 执行在子句INSERT中有用户定义的 PL/SQL 函数的VALUES语句?
INSERT INTO table_name VALUES (plsql_func_name('?'),?,?,?);
应该使用prepareStatement()还是callablestatement()使用?
如何使用 JDBC 执行在子句INSERT中有用户定义的 PL/SQL 函数的VALUES语句?
INSERT INTO table_name VALUES (plsql_func_name('?'),?,?,?);
应该使用prepareStatement()还是callablestatement()使用?
The apostrophes around the parameter are your undoing. Try it this way:
INSERT INTO table_name VALUES (plsql_func_name(?),?,?,?);
Remember that the apostrophes are handled by the prepared statement, as this is one of its main jobs (as it has to prevent potential SQL-injections as well).