PDA

View Full Version : How to create foreign key under xampp with MYISAM engine?



devil_vin
09-27-2007, 07:51 AM
Hi..guys! How can I create foreign key in table which using MYISAM storage engine in xampp?

codeexploiter
09-27-2007, 08:29 AM
I don't think MYISAM types of table support foreign keys in MySQL you need to use InnoDB type of tables for that in which there is a FOREIGN KEY constraint available using which this can be achieved. Refer the following links for more details. The first link has the explanation with some examples of creating foreign keys and the second one is an article about this.

http://dev.mysql.com/doc/refman/5.0/en/innodb-foreign-key-constraints.html
http://www.raditha.com/blog/archives/000490.html

devil_vin
09-27-2007, 08:44 AM
Thanks..If I change all of my table from MYISAM to InnoDB in sql file and import it again,would it affect data integrity?