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: After update delete row id quantity is 0

Re: After update delete row id quantity is 0

From: Serge Rielau <srielau_at_ca.ibm.com>
Date: Mon, 12 Mar 2007 08:05:23 -0400
Message-ID: <55ku03F259rofU1@mid.individual.net>


alex_at_bibiano.es wrote:
> I have table A with columna KEY and QUANTITY
>
> Now I want write a trigger that ckecks after updating a row if
> quantity is 0. If quantiy is 0, I want to delete the row.
>
> Any sugestions?

MERGE statement.
You can trail the UPDATE branch of MERGE with a DELETE WHERE.

Cheers
Serge

-- 
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Received on Mon Mar 12 2007 - 07:05:23 CDT

Original text of this message

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