/*
drop table varray_table;
drop type num_varray;
CREATE TYPE num_varray AS VARRAY(
/
CREATE TABLE varray_table (col
INSERT INTO varray_table VALUES (num_varray(
select * from varray_table;
*/
import java
import java
import oracle
import oracle
class Array
{
public static void main(String args[]) throws Exception
{
int oracleId = CharacterSet
CharacterSet dbCharset = CharacterSet
DriverManager
(new oracle
Connection conn =
DriverManager
(
Statement stmt = conn
ResultSet rs = stmt
while (rs
ARRAY my_array = ((OracleResultSet)rs)
// return the SQL type names
// and lengths of the columns
System
System
System
// get Array elements
String[] values = (String[]) my_array
for (int i =
{
oracle
System
}
}
rs
stmt
conn
}
}
From:http://tw.wingwit.com/Article/program/Oracle/201311/17881.html