what is the difference between primary key & foreign key?
Answers were Sorted based on User's Feedback
Answer / mohammadazam
A primary key is an combination of attributes that uniquely
identifies each row in a relation. A primary key is
designated by underlining the attribute name. The primary
key of an entity set allows us to distinguish among the
various entities of the set.
A foreign key is an attribute in a relation of database
that serves as the primary key of another relation in the
same database.
| Is This Answer Correct ? | 17 Yes | 6 No |
Answer / khan
i dont know
i just read above
and all answer seems to b same and correct
i am confused
| Is This Answer Correct ? | 30 Yes | 21 No |
Answer / dimna
primay key uniquely identifies records in relation.
in a table only one primary key.But may have more than one
foreign key.
| Is This Answer Correct ? | 17 Yes | 9 No |
Answer / ibrahim
primay key uniquely identifies records in relation.
in a table only one primary key.But may have more than one
foreign key.
| Is This Answer Correct ? | 14 Yes | 7 No |
Answer / navane
Primary key is a keyword.
It should not have null value and duplicate value.
We can have only one primary key in a table and the value
should be unique.
Foreign key is a keyword.
It can have null value and duplicate value.
We can have more than one foreign key for a table and this
froeign key table references the primary key table.
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ilakarthi
primary key is available in foreign key but not available in the foreign key for a primary key
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / vaziuddin shaik
PRIMARY KEY
-------------
Primary key is a column in a table which is having unique
values......and it does not contain null values and
duplicate values...........
FOREIGN KEY
-------------
Foreign key is a column in a table which act as reference to
another table.....and it may contain null and duplicate
values.....(or)it may not contain null and duplicate
values...........
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / sairam
primary key is an individual key
foreign key depends in primary key
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / himabindu
primary key is unique.it does not allow null&duplicate
values.it is individual.
foreign key always refers primary key.it is
independent
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / rathika
only one primary key on the table.
more than one foreign key on a table
| Is This Answer Correct ? | 1 Yes | 0 No |
What are the tools for Oracle ?
What is a relational database management system?
write a query to count number of alphabets in given string for example "APPLE" write a query to generate sequence from 50 to 100 write a query to display in single string "ABCD,EFGH,IJKL,PQRS"
Name the three major set of files on disk that compose a database in Oracle?
Explain 1st, 2nd, 3rd normalization form of data base
How to connect to the server with user account: sys?
How to install oracle odbc drivers?
What are synonyms used for ?
is there a tool to trace queries, like profiler for sql server?
I want a table like, no name address addr1 addr2 So i want columns like addr1,addr2 under address column. Can one please answer me. Advance Thanks.
what is the difference between sql& oracle?
What is Rollback Segment ?