Pages

Monday 17 March 2014

SQL Foreign Key Constraint


When we want to establish a relationship between two tables, eventually we have to do it with a help of Foreign Key. It refers one table to another tables Primary Key. To demonstrate it we will need two tables. Its see how to relationship between those two table;


It is so simple, but make sure to name your constants otherwise you may be in trouble if you want to drop constraints.

You can add a Foreign key constraint to a table by Altering it;

How to drop constraint?

No comments:

Post a Comment