Created
July 10, 2017 10:02
-
-
Save velll/c789da1cd625659f660b9b351ebd0e61 to your computer and use it in GitHub Desktop.
Increase varray size!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE TYPE NUMBER_ARRAY AS VARRAY(2) OF NUMBER | |
create table tab_with_arr( | |
id number, | |
val NUMBER_ARRAY) | |
insert into tab_with_arr | |
select 1, number_array(1,2,3,4,5) | |
from dual | |
-- Error! | |
insert into tab_with_arr | |
select 1, number_array(1,2) | |
from dual | |
-- ok! | |
ALTER TYPE NUMBER_ARRAY MODIFY LIMIT 5 INVALIDATE; | |
insert into tab_with_arr | |
select 1, number_array(1,2,3,4,5) | |
from dual | |
-- ok! | |
select t.id, c.column_value | |
from tab_with_arr t, | |
table(t.val) c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment