Monday, November 28, 2011

Difference between PRIMARY KEY,INDEX,UNIQUE INDEX



 PRIMARY KEY                               INDEX                                   UNIQUE INDEX
 

1.  Uniquely identified row.         Record identified based on           Records identified based on
                                                  the index                                      the index
2.  No duplicated rows, no         Duplicate rows, null values            No duplicate rows
      null values                            are allowed                             
3.  Can consist of single or         Dan consist of single or                 Can consist of single or
     multiple columns                   multiple columns                             columns
4.  Which will be stored in         Which is stored in SYSINDEX     Which is stored in sysindex
     SYSKEYS.

No comments:

Post a Comment