Excellent Programming Tricks

Create foreign key using phpMyAdmin


  1. Select foreign key column in the table.
  2. Select Action -> index -> ok
  3. Now click on Relation View

Now add foreign key. 

Constraint option
  1. CASCADE: If delete/update row in 'record' table it also delete row in linked table.
  2. SET NULL:  If delete/update row in 'record' table it also set null in inked table.
  3. NO ACTION: Nothing happened.
  4. RESTRICT: Parent row can't be delete/update if child contain that reference. 
Caution
  1. Both primary and foreign key have same datatype.

No comments:

Post a Comment


Authentic аnd Excellent

Website

HTML Template

Wordpress Theme

Database applications

OR

Application services?

Excellent Programming Tricks (EPT) || Iftekhar-IT || We develops the Web applications and the WordPress templates. || Excellent Programming Tricks (EPT)

© 2020 Blogger Theme by Iftekhar IT || Excellent Programming Tricks

Execllent Programming Tricks. Powered by Blogger.