Difference between primary key and unique key ?

Answer Posted / mohammad ali

-The column holding the primary key constraint cannot accept
null values.whereas colum holding the unique constraint can
accept null values.
-We can declare only one primary key in a table
but a table can have multiple unique key
-Clustered index is created on Primary key constraint and
non clustered unique indexes is created on Unique key constraint.
-Primary key columns automatically become NOT NULL (unique
keys can contain nulls).

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by raw datatype?

579


How to delete multiple rows from a table in oracle?

573


what are bitmap indexes? How does they work?

1729


What is a nvl function? How can it be used?

575


What is a nvl function?

574






What are joins, explain all types of joins?

1734


How to write numeric literals in oracle?

631


What are triggers in oracle?

571


How do I limit the number of rows returned by an oracle query after ordering?

654


How to run queries on external tables?

581


If a parameter is used in a query without being previously defined, what diff. exist betw. report 2.0 and 2.5 when the query is applied ?

1811


Differentiate between post-database commit and post-form commit?

557


What are the different types of database objects?

542


What is a cursor and what are the steps need to be taken?

609


What is the fastest query method to fetch data from the table?

879