Saturday, November 26, 2011

Difference between Primary & Secondary Keys

  PRIMARY KEY: 
 
  • Cannot contain Null values or duplicate rows.
  • Cannot be updated.
  • Can be defined as a foreign key  key of in other table.
  • only one primary key can be defined for one table.
 FOREIGN KEY:
  • Can contain NULL values or rows.
  • Can be updated .
  • which must be primary key of another table.
  • multiple foreign keys can be defined for one table.        

      

No comments:

Post a Comment