If we declare constraints Unique and Not null on a single
column then it will act as a Primary key, so what is the use
of primary key??

Answer Posted / neha sinha

1) Primary key creates clustered index and unique key
creates non-clustered index. Performance wise clustered
index is fast so we need Primary key.
2)if we need more then one primary key in table than we can
use unique key+NOT NULL becous it behave as Primary key but
we cant define more than one column as primary key. :)

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the plv (pl/vision) package offers?

722


What is rownum and rowid?

655


Can we alter stored procedure?

636


What is dml and ddl?

609


what is bcp? When is it used?

671






Write a sql query to convert all character to uppercase after hypen.

1061


What is sql in java?

635


How can you know that statistics should be updated?

720


What can you do with pl sql?

659


How does postgresql compare to "nosql"?

678


what is a table called, if it has neither cluster nor non-cluster index? What is it used for? : Sql dba

613


What are the set operators in sql?

665


How many rows can sqlite handle?

696


What is procedure and function?

595


How does stored procedure reduce network traffic?

629