‎2007 Mar 01 6:41 AM
hi experts,
what is primarykey table and forignkeytable?
thanks in advance
radhakrishna.
‎2007 Mar 01 6:45 AM
Hi,
Primary key : The field which is Unique and not null is called the Primary Key field
Foreign Key : To establish the relations between 2 tables the same key kield in another table is the Foreign key.
Foreign key can or can not be Unique and not-null.
Regards,
Anji
‎2007 Mar 01 6:48 AM
Hi,
I guess that the FOREIGN KEY constraint assures us that the referenced column is
a PRIMARY KEY in an another table.
You can reference any colums with the REFERENCE constraint on column.
Thanks,
Shankar
‎2007 Mar 01 6:57 AM
HI,
Primary key : The field which is Unique and not null is called the Primary Key field
Foreign Key : To establish the relations between 2 tables the same key kield in another table is the Foreign key.
Foreign key can or can not be Unique and not-null.
SRI
‎2007 Mar 01 7:14 AM
Hi Radhakrishanan,
<b>Primary Key:</b>
A primary key is usually called as an unique key.A primary key is defined for each database table. A user-defined primary key can consist of one or more columns.The primary key must have a unique value for each table row. The primary key is either defined by the database user, or generated internally.
<b>
Foreign key</b>
If the values in a column (or a combination of columns) of a table always match the values of the primary key column of another table, then this column (or combination of columns) is called a foreign key.
Please refer to the thread
Hope your query is resolved.
Thanks and regards,
Siva