I didn't write the codebase for MySQL, so it's pointless to tell me that "it's useless to be able to create a foreign key on a MyISAM table". I agree that it's useless, however, it's possible, which is why I put it in there -- as a caveat.
The use is that apparently in future versions MyISAM will support foreign key constraints. It's a comment because it still shows up in SHOW CREATE TABLE and such. Like I said, I didn't design MySQL -- I just use it and was warning that it's possible to create a table. I've seen the dreaded Error number 150 way too many times, and sometimes it's because I forgot the "engine=innodb" part of the CREATE TABLE statement. -Sheeri On 3/31/06, Martijn Tonies <[EMAIL PROTECTED]> wrote: > Hello Sheeri, > > > Indeed, only the BDB and InnoDB storage engines support referential > > integrity. If you accidentally create the table as MyISAM, there is > > no error, though -- the constraints serve as a comment. > > No error? A comment? What use is that? > > If you want FKs, having the FKs as "a comment" is useless. > > Instead, re-create the table as of the InnoDB type. > > 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 > > -- > MySQL General Mailing List > For list archives: http://lists.mysql.com/mysql > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]