how to get the size of varchar in the oracle AssociativeArray type
I have a stored procedure in which I defined a type :
type AssocArrayVarchar2_t is table if varchar(10) index by binary_integer;
I开发者_运维技巧s there any way to get the size of this varchar type (in this case, it is 10) in the C# code? (I am using ODP.net and I want to give it to the OracleParameter.ArrayBindSize property).
Not if it is just a locally declared type. Well not without scanning and parsing ALL_SOURCE. You are better off defining the type as TABLE OF table.column%TYPE
and then you can pick that table/column type from ALL_TAB_COLUMNS.
It also ties your variable to the associated database structure
精彩评论