- Select foreign key column in the table.
 - Select Action -> index -> ok
 - Now click on Relation View
 
Now add foreign key. 
Constraint option
- CASCADE: If delete/update row in 'record' table it also delete row in linked table.
 - SET NULL: If delete/update row in 'record' table it also set null in inked table.
 - NO ACTION: Nothing happened.
 - RESTRICT: Parent row can't be delete/update if child contain that reference.
 
Caution
- Both primary and foreign key have same datatype.
 



No comments:
Post a Comment