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 Foreign Key?
What is the main difference between primary key and Foreign
Key ?
How Foreign Key can be defined?
Is Foreign key is used to join two or more table?

Answer Posted / balaji ganesh doddi

Foreign key is establish the relationship between two
tables.
Primary key is used to uniqly identified by the data into a
table.
The major differences are
Primary key should not contain null values and redundant
value.
Foreign key can contain redundant value.

Foreign key is a primary key of reference table.

Foreign key is defined as= create table employee(empno int
not null,empname char(40)not null,dept char(20),foreign
key(dept)references department(deptno))
Yes Foreign key is used t join two or more tables.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to concatenate two character strings?

1085


How do I enable mysqli extension?

1064


What happens when the column is set to AUTO INCREMENT and if you reach maximum value in the table?

1079


How do I start mysql?

929


Explain the difference between mysql_fetch_array(), mysql_fetch_object()?

992


How to enter microseconds in sql statements?

1028


What is information_schema in mysql?

1049


Explain timestamp?

1015


What is join in mysql? What are the different types of join?

970


How do I delete a table in mysql workbench?

1080


What is a mysql model?

1003


Can foreign key have duplicate values?

938


What is the usage of ENUMs in MySQL?

1180


What is a delimiter in mysql?

1098


What is longblob in mysql?

1017