postgresql7.1 select notification__delete(:notification_id) insert into notification_user_map (notification_id, user_id, sent_date) select :notification_id, :user_id, now() from dual where exists (select 1 from notifications where notification_id = :notification_id) update notifications set notif_html = :notif_html, notif_text = :notif_text where notification_id = :notification_id