Re: Manipulating rows in a delete
From: Chrysalis <cellis_at_iol.ie>
Date: 1997/11/06
Message-ID: <34624BA4.249_at_iol.ie>#1/1
end deltab;
/
HTH
Date: 1997/11/06
Message-ID: <34624BA4.249_at_iol.ie>#1/1
Gautham Ramkumar wrote:
>
> I have a SQL statement as follows.
>
> delete from table_name
> where some criteria;
>
> Now my aim is to do some manipulation with each of the rows I
> delete without using triggers. I thought of a cursor but I can't do a
> delete in that.
> Please help
- What is the objection to an ON-DELETE trigger? Perhaps you only want to do this sometimes, in which case:
- Use a procedure to delete, e.g.
create or replace procedure deltab as
cursor C is select from <table_name>
where <some_criteria> for update of any_column_name;begin
for R in C
loop
< do your thing >; delete <table_name> where current of C;end loop;
end deltab;
/
HTH
-- Chrysalis FABRICATI DIEM, PVNC ('To Protect and to Serve') Terry Pratchett : "Guards Guards"Received on Thu Nov 06 1997 - 00:00:00 CET