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 ?    23 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the file extension accdb stand for?

545


What does pl sql stand for?

653


What is rtm stands for?

577


Is oracel sql developer written in java?

646


Is sqlite free?

534






Can we create clustered index without primary key?

521


How consistent is the view of the data between and within multiple sessions, transactions or statements ?

1706


How can we make an if statement within a select statement?

539


Enlist the data types that can be used in pl/sql?

570


What is the need of merge statement?

550


What is %s in sql?

562


How you improve the performance of sql*loader? : aql loader

575


What is sql*loader?

570


what are enums used for in mysql? : Sql dba

610


What is partition in sql query?

515