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

4 Answers   Ramco,


What are schema-level triggers?

0 Answers  


Is it possible for a table to have more than one foreign key?

0 Answers  


What is java sql driver?

0 Answers  


How will we see framework of a table?

2 Answers   Accenture,






What cursor type do you use to retrieve multiple recordsets?

17 Answers   Apollo, CTS, IonIdea, Microsoft, Oracle, TCS, Vmoksha, Wipro,


Does it possible to pass object (or) table as an argument to a remote procedure?

1 Answers   TCS,


Types of joins?

4 Answers   Microsoft,


Do stored procedures prevent sql injection?

0 Answers  


need to split a string into seperate values. eg. col1 col2 ---------- 100 - 'a,b,c' 200 - 'a,x,b,d,e' 300 - 'c' result: value count ------------- a - 2 b - 1 c - 2 etc.

1 Answers  


how can we submit a form without a submit button? : Sql dba

0 Answers  


What is a call statement? Explain with an example.

0 Answers  


Categories