开发者社区 问答 正文

如果将Number的集合转换为表,该列的名称是什么?10克

如果我想将*替换为列名,它将是什么?

create type mytable$t as table of number; /

declare

mytmou mytable$t := myTable$T();

cnt pls_integer ;

begin

mytmou := myTable$T(1,2,3,4,5,6);

SELECT count(*) into cnt From Table (mytmou);

dbms_output.put_line(cnt);

end;

6

问题来源于stack overflow

展开
收起
保持可爱mmm 2019-11-18 15:52:51 308 分享 版权
1 条回答
写回答
取消 提交回答
  • COLUMN_VALUE 是列的名称

    SQL> ed Wrote file afiedt.buf

    1 declare 2 mytmou mytable$t := myTable$T(); 3 cnt pls_integer ; 4 begin 5 mytmou := myTable$T(1,2,3,4,5,6); 6 SELECT count(column_value) into cnt From Table (mytmou); 7 dbms_output.put_line(cnt); 8* end; SQL> / 6

    PL/SQL procedure successfully completed.

    2019-11-18 15:52:59
    赞同 展开评论
问答标签:
问答地址: