Subject | Re: [firebird-support] violation of FOREIGN KEY constraint "". |
---|---|
Author | Milan Babuskov |
Post date | 2006-12-11T23:25:15Z |
Maurizio P. wrote:
constraint. Find the problematic records like this:
select *
from child_table c
where not exists (
select 1
from parent_table p
where p.PK = c.FK)
Try FB2.0 and FlameRobin ;)
</joke>
--
Milan Babuskov
http://njam.sourceforge.net
http://www.flamerobin.org
> i am tring to add a foreign key to a table which contains some data ,Yes. You need to fix the data so that it doesn't break the FK
> and it seems i can't if i don't delete all the data to the (child) table ,
> fortunately it is only test data : i delete data and i can add the FK
> without any trouble .
> ... is it possible to add a FK without deleting data ?
constraint. Find the problematic records like this:
select *
from child_table c
where not exists (
select 1
from parent_table p
where p.PK = c.FK)
> i use Firebird 1.5. and ibExpert .<joke>
Try FB2.0 and FlameRobin ;)
</joke>
--
Milan Babuskov
http://njam.sourceforge.net
http://www.flamerobin.org