Massimo,

----- Original Message -----
From: "Massimo Petrini" <[EMAIL PROTECTED]>
To: "Heikki Tuuri" <[EMAIL PROTECTED]>
Sent: Tuesday, October 22, 2002 8:32 AM
Subject: foreign key


> There is a way to "verify" the foreign key ?
> If I put in my dump then instruction
> SET FOREIGN_KEY_CHECKS=0;
> I can import the data without control.
> But which is the way to control, after the mysql had imported all, if all
> data were  imported in then correct way ? In other words how I can
controll
> if any foreign key is avalaible ?

if you do not know if the dumps satisfy the foreign key conditions, the it
is best that you do not turn foreign key checks off. You have to import the
tables in the right order. Or, you can check foreign key violations with
LEFT JOINs from the tables. If there are foreign key violations, you have to
clean the data manually anyway.

The setting

SET FOREIGN_KEY_CHECKS=0

was intended for importing table dumps you have taken with mysqldump, for
example.

> Tks for the help
>
> ---------------------------------------------------------
> Massimo Petrini
> c/o Omt spa
> Via Ferrero 67/a
> 10090 Cascine Vica (TO)
> Tel.    +39 011 9505334
> Fax     +39 011 9575474
> E-mail  [EMAIL PROTECTED]


Heikki Tuuri
Innobase Oy
---
Order technical MySQL/InnoDB support at https://order.mysql.com/
See http://www.innodb.com for the online manual and latest news on InnoDB

sql query



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to