Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trigger: nothing returns from USER_TAB_COLUMNS

mail8mzSep 15 2021 — edited Sep 15 2021

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;

This post has been answered by Solomon Yakobson on Sep 15 2021
Jump to Answer
Comments
Post Details
Added on Sep 15 2021
9 comments
597 views