Re: PL/SQL best practices

From: Roy Owen <none_at_nospam.com>
Date: Mon, 5 Aug 2002 13:13:07 -0400
Message-ID: <Why39.255488$724.145570_at_atlpnn01.usenetserver.com>


Afaik it is ALWAYS better to test for an error condition rather than let it throw an exception.

Roy

"Alex" <alexk84_at_hotmail.com> wrote in message news:57d3e820.0208050627.7c79505a_at_posting.google.com...
> When inserting a record into a table A which has a foreign key to
> table B, which of the following would be considerred best practice:
>
> 1. Insert the record and catch the exception that occurs if the
> reference data does not exist in table B.
>
> 2. Lookup the data in table B to ensure that it exists and then
> proceed.
>
> Thanks,
>
> Alex
Received on Mon Aug 05 2002 - 19:13:07 CEST

Original text of this message