about foregine

Answer Posted / vishal

foreign key is the key reference of primary key in first
table suppose u have two table emp and dept in both there is
deptid than we make deptid in dept table as foreign key and
on we add dept in the dept table only when there is entry in
emp table and delete from emp only when there is no
corresponding entry in dept table

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 returns the columns and column information pertaining to the designated table.

566


What are the advantages/disadvantages of mysql and php?

500


How can you change the password of a mysql user?

492


What is schema in mysql?

492


Write a query to find duplicate rows in table?

488






What does mysql flush tables do?

507


What is a delimiter in mysql?

479


Write a query to retrieve a hundred books starting from 20th.

961


Explain the different types of constraints?

516


How to Join tables on common columns.

636


What are the method you will follow while sql installing

1869


How do I save in mysql?

486


What is the function of myisamchk?

561


What are the ways in which you can retrieve data in the result set of mysql using php?

498


What is the use of mysql_close()?

510