oracle8.1.6
declare begin
notification.del(:notification_id);
end;
insert
into notification_user_map
(notification_id, user_id, sent_date)
select :notification_id, :user_id, sysdate
from dual where exists (select 1 from notifications
where notification_id = :notification_id)
update notifications
set notif_html = empty_clob(),
notif_text = empty_clob()
where notification_id = :notification_id
returning notif_html, notif_text into :1, :2