Re: EXCEPTIONS INTO clause

From: Jeffrey M. Stander <willstand_at_acslink.aone.net.au>
Date: 1996/04/06
Message-ID: <3165AFD5.FDE_at_acslink.aone.net.au>#1/1


Chuck Hamilton wrote:
>
> How does this clause work? Is it only used when enabling/creating a
> constraint to let you know what rows will be trouble makers? Or is it
> used to store the trouble makers that you try to update/insert?
> --
> Chuck Hamilton
> chuckh_at_ix.netcom.com
>

It works when you enable/create a constraint.

You have to first create an exceptions table, e.g.

create table exceptions(row_id rowid,

	                owner varchar2(30),
	                table_name varchar2(30),
		        constraint varchar2(30));

When you enable a constraint the exceptions table is populated with the row_id, table_name, etc. of the rows that failed. How you manage cleanup is up to you. The name of the table does not have to be "EXCEPTIONS" but of course must match the tablename specified in the EXCEPTIONS INTO clause.

Jeff Stander
willstand_at_acsline.aone.net.au Received on Sat Apr 06 1996 - 00:00:00 CEST

Original text of this message