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 the Primary and Foreign key?

Answer Posted / nitin

Primary key uniquely identified a record in a table and dont have null values. Also when we create primary key an index is automatically created for primary key.
On the other hand foreign key is used for referential integrity, foreign key can points to primary key in other table and moreover index is not created for foreign key.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of indexes are there in sql?

973


Are stored procedures faster than queries?

929


Can we join more than 2 tables in sql?

1001


Is sql considered coding?

1027


Write the alter statement to enable all the triggers on the t.students table.

1111


What is the use of sql trace?

937


what is self-join? : Sql dba

1127


What is primary key and unique key?

1098


which types of join is used in sql widely? : Sql dba

968


What are the operators used in select statements?

1044


how many values can the set function of mysql take? : Sql dba

969


What is sql exception?

949


What are the sql commands?

1138


how to show all tables with 'mysql'? : Sql dba

1092


Does execute immediate commit?

1196