CREATE OR REPLACE TYPE NumberList IS TABLE OF number(5);
Type created.
DROP TABLE test
ORA-00942: table or view does not existMore Details: https://docs.oracle.com/error-help/db/ora-00942
CREATE TABLE test (
id_std int
, marks NumberList )
Nested table marks store as numere_necesare
Table created.
insert into test(id_std, marks )
values (1,NumberList(6,7,8))
1 row(s) inserted.
update test
set marks = marks multiset union all numberlist(42)
where id_std = 1
1 row(s) updated.
select id_std
, t2.column_value as mark
from test t1
, table(t1.marks) t2
ID_STD | MARK |
---|---|
1 | 6 |
1 | 7 |
1 | 8 |
1 | 42 |
update test
set marks = marks multiset union all numberlist(23, 69)
where id_std = 1
select id_std
, t2.column_value as mark
from test t1
, table(t1.marks) t2