Skip to main content

Posts

Showing posts with the label Difference between Primary key

SQL Server "Primary Key", "Unique Key" and "Foreign Key" [Database]

The PRIMARY KEY and UNIQUE KEY both are similar and it used to apply the uniqueness of the columns and   also used for uniquely identify each row in database tables. The major difference between Primary key, Unique key and Foreign Key as given below.             Primary Key 1.        A primary key cannot accept null values.            2.        A primary key must be unique. 3.        By default,  primary key create only one clustered index in the database . 4.        Each table can have one and only one primary key. 5.        Each table can have one and only one clustered index. 6.        Primary key can be made foreign key into another table. 7.   ...