PL/SQL (MOSC)

MOSC Banner

Can a parameter that is a table of records have a NULL default value?

edited Jul 26, 2012 4:05AM in PL/SQL (MOSC) 4 commentsAnswered
 I have a procedure with a long list of parameters.  One of the parameters is a pl/sql table of records.
But sometimes the procedure will be called with data in the table of records, and sometimes not.  (Sometimes there will not be any data to put in the table of records.)

Numbers, varchars and dates can be declared with a DEFAULT NULL.  Is there something similar for tables of records?

Ex.
TYPE myRec IS RECORD
    (column1 varchar2,  column2  number);

TYPE myTableOfRecords is TABLE of myRec;

Procedure HandleMyRec (
         inputVar1  IN VARCHAR2
       , inputVar2  IN VARCHAR2  DEFAULT NULL
       ,inputVar20  IN myTableOfRecords
      ) .....

If there's no data for inputVar20, it needs to default to NULL.  How can this be done?

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center