>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
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]