在编写 Java 存储过程时,我经常通过 oracle.sql.ARRAY
参数接收值。但是,如何通过 oracle.sql.ARRAY
参数导出值?例如:
public static void fetchFavoriteFoods(oracle.sql.ARRAY favoriteFoods) {
// What must be done here to add "pizza" and "cheese burger" to favoriteFoods?
}
最佳答案
简单地说,你不知道。
java.sql.Array
及其实现(如oracle.sql.ARRAY
)是
a logical pointer to the data in the SQL ARRAY value rather than containing the ARRAY value's data.
不用说,这意味着它们是只读值。
关于java - 如何修改 Java 存储过程中的 oracle.sql.ARRAY 参数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4125508/