What's the difference between a primary key and a unique key?

Answer Posted / hameed

Primary key does not allow any null value in a table where
as Unique key allows only one null value

Primary key is by default a Clustered Index where as Unique
key is a non-clustered index

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are indexes in ms sql server?

635


How to create a dynamic cursor with the dynamic option?

633


How to create a view on an existing table in ms sql server?

698


Explain differentiate between a having clause and a where clause?

591


How to replace given values with null using nullif()?

645






How secure is sql server database?

601


What is the command used to check locks in microsoft sql server?

615


What are the types of joins in sql?

655


What is the usage of sign function?

694


What do we need queues in sql service broker?

605


What are key constraints?

596


What to check if a User database is locked?

667


Do you know how to implement service broker?

621


How do I know if localdb is running?

599


In which format does an image save in SQL Server database ?

687