Skip to content

Instantly share code, notes, and snippets.

@velll
Created March 26, 2014 12:57
Show Gist options
  • Select an option

  • Save velll/9782483 to your computer and use it in GitHub Desktop.

Select an option

Save velll/9782483 to your computer and use it in GitHub Desktop.
nested table indexing
create type wide AS OBJECT(
num NUMBER,
vch VARCHAR2(4000))
create or replace type wide_table as table of wide
create table SD_DISCOUNT_SERVICES
(
N_DISCOUNT_SERVICE_ID NUMBER not null,
N_DISCOUNT_SPEC_LINE_ID NUMBER not null,
N_SERVICE_ID NUMBER,
T_TAGS wide_table,
N_QUANT_MIN NUMBER,
N_QUANT_MAX NUMBER,
N_UNIT_ID NUMBER,
N_LINE_NO NUMBER,
C_ACTIVE CHAR(1) default 'Y' not null
constraint CKC_C_ACTIVE_SD_DISCO check (C_ACTIVE in ('Y','N'))
)
nested table T_TAGS store as SN_DISCOUNT_SERVS_TAGS;
select * from all_indexes where table_name = 'SN_DISCOUNT_SERVS_TAGS'
select DBMS_METADATA.GET_DDL('INDEX','SYS_C00230154') from DUAL;
create index
SR_PRETERM_CLS_REASONS_NT_IDX
ON SR_PRETERM_CLOSE_REASONS (
NESTED_TABLE_ID ASC)
TABLESPACE HYDRA_INDEX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment