Hi All,
I am using Oracle 19c.
create or replace type t_numbers is table of number;
create table test_tab (
id number(22),
nums t_numbers
) nested table nums store as nt_tt_nums;
INSERT INTO test_tab VALUES (1, t_numbers(1,2,3,4));
INSERT INTO test_tab VALUES (2, t_numbers(1,2,3,4,5));
INSERT INTO test_tab VALUES (3, t_numbers(1,2,3,4,5,6));
How may I count elements in nums
column?
Below statement does not work because of ORA-00904: "NUMS"."COUNT": invalid identifier
SELECT id, nums.count AS has_items
FROM test_tab;
Best regards,
Jacek
Cleaning:
drop table test_tab;
drop type t_numbers;