what is mean by prmary key and foreign key and how can we
diffrentiate that?
Please answer me.
Advance thanks.
Answers were Sorted based on User's Feedback
Answer / ravi singh
Primary Keys: Primary keys are the identifier and applied
on the table in the form of constraints. Primary key
provides uniqueness in the data.
Foreign Key: Foreign Keys are the relationship and applied
on the table in the form of constraints. Foreign key in a
table is a primary key of another table and use to make
relationship between two tables.
Is This Answer Correct ? | 59 Yes | 3 No |
Answer / cm
example :
primary key table: emp ( ENO, ename, address)
here eno is primary key
foreign key: table hari( ENO, phone, salary)
here same eno from hari table is used to get the values
from emp.
Is This Answer Correct ? | 32 Yes | 1 No |
Answer / sandeep.n
primary key means to provide the information that the
colomn belongs to the same table, where as the forigen key
means to get the data from other table.
Is This Answer Correct ? | 14 Yes | 4 No |
Answer / ysailajasantosh
Primary key means a unique key which is constant.
A foreign key (FK) is a column or combination of columns
that is used to establish and enforce a link between the
data in two tables. You can create a foreign key by
defining a FOREIGN KEY constraint when you create or modify
a table.
Is This Answer Correct ? | 7 Yes | 1 No |
Answer / harish
LET ME TELL IN SINGLE SENTENCE!!! :)
"ALL FOREIGN KEYS ARE PRIMARY KEYS BUT NOT VICE-VERSA"
Is This Answer Correct ? | 7 Yes | 2 No |
Answer / ritesh singhq
primary key is a complete date for all the member and
subject like and employee and all the data like
sale : note book pen pencil eraser
foreign key is a complete data of particular 1 thing like
note book : company name , numn of note book , creation
date etc
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / nimmi
PRIMARY KEY : IS THE UNIQUE KEY OF A SINGLE TABLE THAT IS
THE UNIQUE IDENTIFICATION OF THE SAME TABLE.
FOREIGN KEY: MEANS A UNIQUE KEY IDENTIFICATION COMMON TO TWO
TABLES .
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / b.jaganathan
PRIMARY KEY: the key which is used in the database table
for an identification is said to be a "PRIMARY KEY"....
FOREIGN KEY: the key which is used in the another database
table is said to be a foreign key, for the specified data
table........
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / dheeban02
primary key is used as unique key and foreign key is referred
with foreign key
Is This Answer Correct ? | 3 Yes | 3 No |
What is Virtual Private Database in Oracle?
What privilege is needed for a user to create indexes in oracle?
How to rename a tablespace in oracle?
How do I call oracle stored procedures that take no parameters?
Is rowid unique in oracle?
What privilege is needed for a user to create views in oracle?
in account table account type amount ac1 credit 300 ac2 debit 5000 ac3 credit 3000 ac1 debit 4000 ac3 debit 2000 ac2 credit 4000 write a query how to get sum of credit & sum of debit
In Oracle Clinical 4.5.0, can the VIEW_TEMPLATE_ID column in DATA_EXTRACT_VIEWS table contain NULL value?
Can a formula column referred to columns in higher group ?
what is the use of rank function?
How to convert csv to table in oracle?
What is recycle bin in Oracle?