Sqlserver Interview questions


Total available count: 45
Subject - Databases
Subsubject - Sqlserver

What is the difference between a primary key and a unique key?

Primary key:-

  • It creates clustered index on the column
  • It doesn't allow NULL values
  • It creates on one column

Unique key:-

  • It creates a non-clustered index on the column
  • It allows only one NULL value
  • It creates on multiple columns
  • A programmer can have many Unique key constraints per table, but only one Primary key constraint per table



Next 4 interview question(s)

1
What is NOT NULL Constraint?
2
What is Check Constraint?
3
What is Unique key constraint?
4
What is a Primary key?