FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Add Foreign Constraint doubt





admod
Hi pals,

I create 2 tables with name tbl_project and tbl_issue and I plan to give
Foreign key constraint for tbl_issue by giving alter table command as
"ALTER TABLE `testdrive`.`tbl_issue` ADD CONSTRAINT `FK_issue_project` FOREIGN KEY

(`project_id`) REFERENCES `tbl_project`(`id`) ON DELETE CASCADE ON UPDATE RESTRICT"

It's successfully executed and when I check the table tbl_issue I found the
Alter table command as "ALTER TABLE `tbl_issue`
ADD CONSTRAINT `FK_issue_project` FOREIGN KEY (`project_id`) REFERENCES `tbl_project` (`id`) ON DELETE CASCADE;"

there missing the "UPDATE RESTRICT" , I feel wonder why this like that ? Do you any one
can explain why this ? If you have idea PLS EXPLAIN

THANKS
ANES
Related topics
F. Nietzsche
sql with phpmyadmin
What's great about your country?
what can I do to kill time???
President Bush talks w/ Matt Lauer on Torture
Tony Blair
youtube videos
A suggestion... take it as you will
Top 10 British Insults
Obama stimulus: +millions of American jobs
Pope Quits
what does constraint foreign key means when we create table
Bomb Syria to help out or...
The Sunday Assembly has arrived in Australia
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.