Home > database >  Some of the complex RECORD definition of oracle
Some of the complex RECORD definition of oracle

Time:10-12

I define the RECORD, the type of one project is varrays, at that time if I want to SELECT... INTO the types of data, should select how to write, or can't achieve

The CREATE OR REPLACE PROCEDURE REN_TEST AS

TYPE MY_ARRAY_TYPE IS varrays (400) OF the NUMBER;

TYPE ST_HGSKEIKAKU IS RECORD (TTP MY_ARRAY_TYPE);

HGSKEIKAKU ST_HGSKEIKAKU;

MY_ARRAY MY_ARRAY_TYPE;

The BEGIN

SELECT MY_ARRAY_TYPE INTO HGSKEIKAKU (1, 2) FROM DUAL;

DBMS_OUTPUT. PUT_LINE (' KYM (1)='| | HGSKEIKAKU. TTP (1));
END;

CodePudding user response:

1, use the SELECT... BULK COLLECT INTO ary_name the FROM... ;
2, the original poster defines a one dimensional array, can use the following select the two-dimensional, it doesn't seem quite right.
  • Related