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??

Answers were Sorted based on User's Feedback



If we declare constraints Unique and Not null on a single column then it will act as a Primary key..

Answer / 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

If we declare constraints Unique and Not null on a single column then it will act as a Primary key..

Answer / 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

If we declare constraints Unique and Not null on a single column then it will act as a Primary key..

Answer / ashok

Internally , There is same as primary key and unique not null.
You can say unique + not null is higher step of primary key .
So there is no basic difference between this two.

Is This Answer Correct ?    7 Yes 11 No

Post New Answer

More SQL PLSQL Interview Questions

what is the purpose of update command in oracle?

7 Answers   MBT,


What is the basic structure of PL/SQL ?

6 Answers  


What is sql in oracle?

1 Answers  


What is the difference between join and union.

27 Answers   3i Infotech, ABC, Oracle, Polaris, TCS, XT Global,


In testing where do we use sql language and how it helps in testing?

2 Answers  


What is the purpose of the sql select top clause?

1 Answers  


What is information schema in sql?

1 Answers  


What is difference between db2 and sql?

1 Answers  


what is sql profiler

2 Answers   Fidelity,


What is referential integrity ?

3 Answers   BirlaSoft,


What are triggers, and when would you use them?

3 Answers  


What are the different type of joins in sql?

1 Answers  


Categories