i'm not an expert by any means :) but, you do need indexes on both the primary key and the foreign key. you've got one on foo_id, but you also need on on foo_value.
check the lists for more information. there's been plenty of discussion lately ... good luck Sibananda Sahoo wrote: > > Dear Sir > > I am using MySQL 3.23.56. I want to achieve foreign > key constraints. But not able to achieve. > > Right now status of table is : MyISAM. So I tried to > convert it to InnoDB in the following way but not able > to convert. > > 1. ALTER TABLE mytableName Type=InnoDB; > > Then I tried to create a table > > create table foo ( > foo_id int unsigned auto_increment, > foo_value int, > primary key(foo_id) > ) type=innodb; > > For the above table it also shows the status as > MyISAM. > > Could you pls suggest how can I change and to achieve > foreign key constraints. > > Rgds, > Sibananda > > __________________________________ > Do you Yahoo!? > Yahoo! Calendar - Free online calendar with sync to Outlook(TM). > http://calendar.yahoo.com -- Jeff Mathis, Ph.D. 505-955-1434 The Prediction Company [EMAIL PROTECTED] 525 Camino de los Marquez, Ste 6 http://www.predict.com Santa Fe, NM 87505 -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]