Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: convert delete to update

Re: convert delete to update

From: andrewst <member14183_at_dbforums.com>
Date: Mon, 27 Oct 2003 07:55:07 -0500
Message-ID: <3526361.1067259307@dbforums.com>

Originally posted by Sunil

> Hi,

> Is it possible to convert a delete statement to an update by
> using a

> trigger.

> I am trying to do some thing like if a row from a table is deleted
> I do

> not actually delete the row but need to only set a deleted flag.

>

> Any other ideas on how to achieve the above.

>

> Thanks,

> Sunil.

If you want, you could do this:

  1. Rename the table to something else and not grant any privileges on it. 2) Create a view on the table, naming the view with the old table name, and grant privileges on the view.
  2. Create an INSTEAD OF DELETE trigger on the view that performs an update instead of a delete.
--
Posted via http://dbforums.com
Received on Mon Oct 27 2003 - 06:55:07 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US