如果我想用列名替换*,它会是什么?
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
答案 0 :(得分:2)
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.