What's the difference between a primary key and a unique
key?
Answer Posted / swapna
Both primary key and unique enforce uniqueness of the
column on which they are defined. But by default primary
key creates a clustered index on the column, where are
unique creates a nonclustered index by default. Another
major difference is that, primary key doesn't allow NULLs,
but unique key allows one NULL only.
Is This Answer Correct ? | 16 Yes | 0 No |
Post New Answer View All Answers
Can multiple columns be used in sql group by clause in ms sql server?
What is the fillfactor concept in indexes?
ow to bring suspect mode datbase online from scratch
We are updating a field in sql and alter the row also.after giving the commit command the system is crashed.what will happen to the commands given,whether it will update and alter the table or not?
What is an indice?
You schedule a job to run every minute what will happen if the first job runs more than 1 min? Will the second instance of the job start?
How many null values we can have in a unique key field in sql server?
When would you use it?
What are unicode character string data types in ms sql server?
How to configure odbc dsn with different port numbers?
How to find out what is the default collation in a database?
Mention what are the core components of ssrs?
Define self join in sql server joins?
What are different types of views?
How retrieve field names from the table in SQL through JAVA code?