what is the difference between primary key & foreign key?
Answers were Sorted based on User's Feedback
Answer / anil bharodiya
Primary key is field of the table that can be used to
uniquely identify records of the table
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sripathi venkata ramesh
I am Sripathi Venkata Ramesh from Gudivada and the answer
is mentioned below
Primary key: A Primary key is a column or group of columns
used to uniquely identify each row in a table like
It defines the column as a Mandatory column.
The data held across the column must be unique.
By default it creates clustered index.
It does not allow null values and duplicate values
Foreign key: A Foreign key is a column or group of columns
whose values are derived from the primary key of some other
table
Is This Answer Correct ? | 2 Yes | 2 No |
Answer / bharathi sundar
A PRIMARY KEY DOES NOT ACCEDES DUPLICATIONS .
A FOREIGN KEY IS USED FOR LINKING TWO DATABASE TABLES
ABSTRUSELY .
A FOREIGN KEY USES THE PRIMARY KEY IN ANOTHER TABLE,
TO RETRIEVE OR TO IDENTIFY THE CELL VALUES IN ANOTHER
TABLE.........
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / sravan kumar
A attribute which it is uniquely identifies in a row in a
table is called Primary key..
A column in a table whose values matches the primary key in
some other table is called Foreign key
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / raja
foriegn key always refers to
primary key but Primary key is unique key
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / suneel manne
Primary key is a key it will allow only Unique values and
avoid duplicate values and foreign key is a reference key
from the other table, So here primary key acts as a parent
key and foreign key acts as a child key.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / ibrahim
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 ? | 0 Yes | 1 No |
Answer / kush kaushik
Primary key is primary means from india and foreign key is forgeiner means from forign .. ..By kush kaushik(kush.kaushik87@gmail.com)
Is This Answer Correct ? | 0 Yes | 1 No |
Explain oracle left join with an example?
What is an oracle and why it is used?
How to do paging with oracle?
why should i declare foreign key constraint as self relation instead of binary relation in tables ?
How to store pictures on to the database?
What is an oracle user role?
how to find out largest value in a table
What is the sid in oracle?
How can we find out the current date and time in oracle?
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.
If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?
Why is oracle used?