My Oracle Support Banner

DBMS_SQL.DESCRIBE_COLUMNS DISPLAYS WRONG PRECISION AND SCALE FOR PL/SQL COLLECTIONS (Doc ID 2666487.1)

Last updated on JUNE 18, 2020

Applies to:

PL/SQL - Version 12.1.0.1 and later
Information in this document applies to any platform.
Applies to only Associative arrays.

Symptoms

DBMS_SQL.DESCRIBE_COLUMNS displays wrong precision and scale for Collection (associate array), works fine for normal table.
12.1.0.2.0 and 11.2.0.4.0 have the same behaviour.

The column xx is declared as number (10,0).
For COL_PRECISION and COL_SCALE the Values 10, 0 are expected but 0,0 is returned as shown below.

A number (10,0) can after the describe processed as integer, a number (0,0) must be handled as double.

A testcase is attached to the note.

This is what is expected for a query on a DBMS_SQL.DESCRIBE_COLUMNS for Associative array as well.

The result from a DBMS_SQL.DESCRIBE_COLUMNS is always (0,0), there is no difference if the type is declared inside a package or explicitly with CREATE TYPE.




Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.