What is the difference between primary key and unique constraints?



What is the difference between primary key and unique constraints?..

Answer / Puneet Kumar Bhardwaj

A Primary Key is a special type of Unique Constraint that serves to identify each row uniquely within a table. A table can have only one Primary Key, but multiple columns can form a composite Primary Key. In contrast, a Unique Constraint ensures the uniqueness of a specified set of columns, allowing for multiple Unique Constraints per table.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What are the grouping functions?

1 Answers  


What is plan freezing?

1 Answers  


Define cross join in sql server joins?

1 Answers  


Define left outer join in sql server joins?

1 Answers  


What are the different authentication modes in sql server? How can it be changed?

1 Answers  


What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?

1 Answers  


If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?

0 Answers   Facebook,


Why use “in” clause in sql server?

1 Answers  


What is the Difference beween sql server 2005 and sql server 2008

3 Answers   CMC, Hitech,


An employee table, with the columns id, name, sal and dob. Query to select emp names of all highest salaries(there are 4-5 people having the same salary which happens to be the highest).

9 Answers   ADP,


List the ways in which dynamic sql can be executed?

0 Answers  


can any body tell me how to know the password of current user in sql server

1 Answers   Crea, HCL,


Categories