Hello,
i'm using a pl/sql procedure and I prevent inserting duplicate tuples using
an exception for example:

  BEGIN
       INSERT INTO "Triples"(id, subject, predicate, "object")
                    VALUES (id, sub_i, pred_i, obj_i);
* EXCEPTION WHEN unique_violation THEN
                --do something.

*In some cases I have interest in getting the id of the tuple that was
already in the table when the exception is triggered. Is there a way for the
EXCEPTION to return that id instead of using a select to know wich was the
id of the triple already existing in the table?

Thanks,
Filipe

Reply via email to