You are here: Re: visual databasing « PHP SQL « IT news, forums, messages
Re: visual databasing

Posted by NC on 02/24/06 08:51

Jim Michaels wrote:
>
> When you create a table, the relationship is created
> as follows with the keyword REFERENCES:
> CREATE TABLE `dbo`.`categoryroots` (
> `cat_id` int(10) unsigned NOT NULL default '0'
> COMMENT 'copy of cat_id from categories table',
> PRIMARY KEY (`cat_id`),
> FOREIGN KEY (`cat_id`) REFERENCES `categories`(`cat_id`)
> ON DELETE CASCADE ON UPDATE NO ACTION,
> UNIQUE KEY `ix_crcat_id` (`cat_id`)
> ) ENGINE=InnoDB;

This only works on InnoDB tables; moreover, the ON UPDATE action on
foreign keys is only available in MySQL 4.0.8 or newer...

Cheers,
NC

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация