Varray

PHOTO EMBED

Thu Sep 23 2021 05:37:19 GMT+0000 (UTC)

Saved by @kaveen

Create type excharray as varray(5) of varchar(12)

create type share_t as object(
	cname varchar(12),
  	cprice number(6,2),
    exchanges excharray,
    dividend number(4,2),
    earning number(6,2)
)

create table shares of share_t(cname primary key)

insert into shares values('BHP',10.50,excharray('sydney','new york'),3.75,6.55)

select cname,e.COLUMN_VALUE exchanges
from shares s, table(s.exchanges) e
content_copyCOPY