Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the difference between primary key & foreign key?

Answers were Sorted based on User's Feedback



what is the difference between primary key & foreign key?..

Answer / vasavi

primary key does not allow duplicate and null values
primary is unquie.

foreign key allows null values it refers primary key.

foreign key allows duplicate values.

Is This Answer Correct ?    1 Yes 0 No

what is the difference between primary key & foreign key?..

Answer / amuthan

primary key is the parent and foreign is the child.

Is This Answer Correct ?    1 Yes 0 No

what is the difference between primary key & foreign key?..

Answer / anjanareddy

i cleared this question simple.

TAKE A LOOK

primary key:-It doesn't allow NULL values and duplicate values
it is a unique one.


Foreign key:- It allows NULL and duplicate values
It always give reference to primary key of another table

Is This Answer Correct ?    1 Yes 0 No

what is the difference between primary key & foreign key?..

Answer / zacharia ismail

primary key: primary creates a clustered index on the
column and it doesn't allow null values.
foreign key: A foreign key (FK) is a column or combination
of columns used to establish and enforce a link between the
data in two tables.

Is This Answer Correct ?    1 Yes 0 No

what is the difference between primary key & foreign key?..

Answer / ansul singh

Primary key is unique key but Foreign key always refers to
primary key.
Primary key is the parent & Foreign key is the child.
Primary key is unique, Primary key is not null and
Foreign key is null, Foreign key reference as primary key
is another table.
Primary key will not allow "Null values" & "Duplication
values",
Foreign key will allow "Null values & "Duplicate values" &
it refers to a primary key is another table.

Is This Answer Correct ?    1 Yes 0 No

what is the difference between primary key & foreign key?..

Answer / pravin

The primary key of a relational table uniquely identifies
each record in the table. It can either be a normal
attribute that is guaranteed to be unique (such as Social
Security Number in a table with no more than one record per
person) or it can be generated by the DBMS (such as a
globally unique identifier, or GUID, in Microsoft SQL
Server). Primary keys may consist of a single attribute or
multiple attributes in combination.

Examples:
Imagine we have a STUDENTS table that contains a record for
each student at a university. The student's unique student
ID number would be a good choice for a primary key in the
STUDENTS table. The student's first and last name would not
be a good choice, as there is always the chance that more
than one student might have the same name.

Is This Answer Correct ?    1 Yes 0 No

what is the difference between primary key & foreign key?..

Answer / suraj menon

primary key is used to identify a row and it doesnot allow
null values. It avoids duplication of rows.

Foreign key will allow "Null values" and "Duplicte values"
and it refers to a primary key in anoter table.

Is This Answer Correct ?    1 Yes 0 No

what is the difference between primary key & foreign key?..

Answer / raffi.shaik

Primary key is unique
primary key is not NULL and

foreign key is NULL
foreign key reference as Primary key in another table

Primary key is unique key but foreign key always refers to
primary key

primary key is used to identify a row and it does not allow
null values. It avoids duplication of rows.

whereas foreign key refers to a column or combination of
columns included in the definition of referential integrity.

In the context of relational databases, a foreign key is a
referential constraint between two tables.[1] The foreign
key identifies a column or a set of columns in one
(referencing) table that refers to a column or set of
columns in another (referenced) table. The columns in the
referencing table must form a primary key or unique key.

Is This Answer Correct ?    1 Yes 0 No

what is the difference between primary key & foreign key?..

Answer / baburao

primary key is a key which can define unique values
where as foreign key refers to a parent table and depends
on primary key

Is This Answer Correct ?    0 Yes 0 No

what is the difference between primary key & foreign key?..

Answer / g. rajamani

Primary key is a key, that is a not null or unique key. But
foriegn key is null, that is refere to the primary key.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

A and B are tables. x is a column. Then What is difference between A.x = B.x(+) and A.x = B.x ?

7 Answers   Cognizant, IBM,


what are the disadvantages of hierarchial database over RDBMS?

1 Answers   TCS,


Can select statements be used on views in oracle?

0 Answers  


What is a trigger oracle?

0 Answers  


How do I know if oracle is installed on windows?

0 Answers  


In the oracle version 9.3.0.5.0, what does each number shows?

0 Answers  


Explain the difference between a procedure and a function? What do you understand by those terms?

0 Answers  


Difference between the “verify” and “feedback” command?

0 Answers  


What is primefaces used for?

0 Answers  


13. Display the second to fifth characters in each client name.

2 Answers   Wipro,


What happens to the current transaction if a ddl statement is executed?

0 Answers  


What are virtual columns?

2 Answers   TCS,


Categories
  • Oracle General Interview Questions Oracle General (1803)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)