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

Home -> Community -> Usenet -> c.d.o.misc -> Re: can't delete row !

Re: can't delete row !

From: Ken Denny <kendenny_at_bnr.ca>
Date: 1997/09/24
Message-ID: <34294716.2090@bnr.ca>#1/1

Jordi Bellver wrote:
>
> Buenas !
>
> When I tried to delete one entry from Table 'paises' i get the
> error:
>
> ------------------------------------------------------------
> PL/SQL> delete from paises where id_pais='TODOS';
> ERROR 0 at line 1, column 0
> Unhandled exception ORA-02292: restricción de integridad
> (WOUSR.SYS_C001148)
> violada - registro hijo encontrado
>
> [integrity restriction violated . son register found]
>

Hi Jordi

This error message means that there is another table which has a foreign key constraint pointing to the 'paises' table. You can find out which table has the foreign key constraint by doing:

'select table_name from all_constraints where owner='WOUSR' and constraint_name='SYS_C001148';

What a foreign key constraint means is that there's a column in the other table that has to match a primary key in the PAISES table and if you delete this row from PAISES there will be rows in the other table that will be invalid. You will have to delete all matching rows from the other table before you will be able to delete the row from PAISES.

Hope this helps
Ken Denny
kendenny_at_bnr.ca (work)
kdenny_at_interpath.com (home) Received on Wed Sep 24 1997 - 00:00:00 CDT

Original text of this message

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