如何修改甲骨文。sql。Java存储过程中的数组参数?
在编写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?
}
# 1 楼答案
简单地说,你没有。 ^{} 及其实现(如
oracle.sql.ARRAY
)是不用说,这意味着它们是只读值
# 2 楼答案
这应该符合你所寻找的内容: Oracle ARRAY type usage
基本上,您可以创建自己的oracle对象。sql。数组并使用它