What is Foreign Key?
What is the main difference between primary key and Foreign
Key ?
How Foreign Key can be defined?
Is Foreign key is used to join two or more table?
Answer Posted / sunil kumar
Foreign key represents the relationship between two tables.
A foreign key in a table whose value is derived from the
primary key from some other table.The table in which foreign
key is defined is called a foreign table or detailed table.
The table that defines the primary key and is referenced by
the foreign table is called primary table or master table.
Difference between primary key and foreign key is that
primary key must contain a value,must not contain null
value,redundant value and foreign key can contain redundant
value.
Foreign key is defined as= create table employee(empno int
not null,empname char(40)not null,dept char(20),foreign
key(dept)references department(deptno))
Yes Foreign key is used t join two or more tables.
| Is This Answer Correct ? | 13 Yes | 0 No |
Post New Answer View All Answers
How to upload a large file through phpmyadmin in mysql?
How do you stop an access query?
What is the difference between the LIKE and REGEXP operators?
How show all tables in mysql query?
How do I view a mysql database?
What is a text delimiter?
Is mysql from oracle?
What is mysql connector used for?
How to show certain selected rows with the value "pcds".
How to delete a column and add a new column to database
Will mysql remain free?
What is the insert?
How do I download mysql?
How to create a new view in mysql?
Does mysql need a server?