From: Martijn Tonies Date: March 12 2006 12:21pm Subject: Re: SQL Foreign Key List-Archive: http://lists.mysql.com/mysql/195683 Message-Id: <023701c645cf$832ae0d0$cd02a8c0@martijnws> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: 7bit Hello Andreas, You're not telling us what version of MySQL you're using, so I'll have to give it a shot in the dark ... > mysql> SHOW CREATE TABLE friends\G > *************************** 1. row *************************** > Table: friends > Create Table: CREATE TABLE `friends` ( > `id` smallint(5) unsigned NOT NULL auto_increment, > `firstname` varchar(22) collate latin1_german2_ci default NULL, > `lastname` varchar(30) collate latin1_german2_ci default NULL, > `nick` varchar(20) collate latin1_german2_ci default NULL, > `birthdate` date default NULL, > `gender` enum('m','f') collate latin1_german2_ci default 'm', > `category` smallint(5) unsigned default '0', ----> create an index on the CATEGORY column and try again. Martijn Tonies Database Workbench - development tool for MySQL, and more! Upscene Productions http://www.upscene.com My thoughts: http://blog.upscene.com/martijn/ Database development questions? Check the forum! http://www.databasedevelopmentforum.com