Re: foreign key problem

From: Date: Wed, 31 Jan 2001 01:52:42 +0000
Subject: Re: foreign key problem
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-6272@lists.php.net to get a copy of this message
hello all! i have a little problem ,hope someone can help me out the problem is : let i have two tables T1 and T2 ,now T1 has following fields cntryid cntryname cntrycode etc. now cntryid is the primary key now i want to make the cntryid a foreign key in table T2 .so how can i do it plz help me . msjamal
A column is a foreign key because it contains only values found in the referenced key, and no NULLs. Design your database so that the foreign key column contains only values from cntryid. If you want to know how to declare a referenced key/foreign key relationship, you will have to specify what RDBMS you are using. Bob Hall Know thyself? Absurd direction!
Bubbles bear no introspection.     -Khushhal Khan Khatak


« previous php.db (#6272) next »