I am using Oracle 19c. I need to retrieve information from USER_TAB_COLUMNS in the statement trigger of one table. There is no error firing the trigger, however nothing returned from USER_TAB_COLUMNS.
Any suggestion?
create table mysche1.tb_test (id number(1), comment varchar2(20));
insert into mysche1.tb_test value (1, 'This is first line');
create or replace trigger mySche1.AUT_tb_test after update on mySche1.tb_test for each row
declare
cursor vco_col_nm
is
select column_name form user_tab_columns where table_name = 'tb_test'
colList varchar2(2048);
begin
for colNm in vco_col_nm loop
colList := colList || colNm.column_name || ','
end loop;
mySche1.pack1.proc1 (colList); --I print out the colist in the PLSQL, which displays nothing.
end;
update mySche1.tb_test set comment = 'second' where id =1;