Mega Code Archive

 
Categories / Oracle PLSQL Tutorial / System Packages
 

Signal along with the entries in a table

SQL> SQL> create table job_table   2  ( job_id     int primary key,   3    alert_name varchar2(30),   4    message    varchar2(2000)   5  )   6  / Table created. SQL> SQL> create or replace procedure background_alert( p_job in int )   2  as   3      l_rec job_table%rowtype;   4  begin   5      select * into l_rec from job_table where job_id = p_job;   6      dbms_alert.signal( l_rec.alert_name, l_rec.message );   7      delete from job_table where job_id = p_job;   8      commit;   9  end;  10  / SQL> SQL> drop table job_table   2  / Table dropped. SQL>