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?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

State all possible different index configurations a table can possibly have?

1007


What is an Oracle index?

1655


How to invoke the data pump export utility?

1188


How to select some rows from a table in oracle?

1078


Explain how you would restore a database using RMAN to Point in Time?

2146


nw i'm doing MBA system and planning to do oracle,database management.tell me that whether it is useful r not?.refer any course for my carrier pls

2209


What is background process in Oracle?

1102


Hi friends can u send the oracle 9i full version download link?????????????? please reply ?

1865


Who developed oracle & when?

1003


Where do we use decode and case statements?

1014


What is a data lock in oracle?

1123


Explain do view contain data?

1013


What is a sub query and what are the different types of subqueries?

1126


How to start your 10g xe server?

1042


What to do if dba lost the system password?

1172