View Single Post

   
  #2 (permalink)  
Old 04-17-2008, 08:34 PM
Harald Armin Massa
 
Posts: n/a
Default Re: How to overwrite a table [only data]?

Ezequias ,

>
> I would like to overwrite a table with problem with his original. But
> there are some points.
>
> I can't just delete and restore it becouse it has a foreign key and when I
> try to delete it ask for drop cascade.
>
> As I know the drop cascade delete in both tables the rows related. Is it
> correct ?
>
> You are right.


Your database structure disallows this kind of deletes.

So, if you want to allow it, you have to disable / remove that foreign key
restriction, refresh your data, and reimplement that restriction.

Be aware that foreign key restrictions usually are there for a reason.

Harald




--
GHUM Harald Massa
persuadere et programmare
Harald Armin Massa
Reinsburgstraße 202b
70197 Stuttgart
0173/9409607
-
Python: the only language with more web frameworks than keywords.

Reply With Quote