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 are %TYPE and %ROWTYPE? what is the difference?

7 Answers   ICICI, Saama Tech, Sail,


select sal from emp group by sal

3 Answers   TCS,


What is lexical units in pl sql?

0 Answers  


Is crud a cuss word?

0 Answers  


What is clustered index in sql?

0 Answers  






what are the performance and scalability characteristics of mysql? : Sql dba

0 Answers  


What are the different ddl commands in sql?

0 Answers  


What are the query optimization techniques?

0 Answers  


What is materialized view. What are different methods of refresh?

0 Answers  


Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)

0 Answers  


Is record in pl sql?

0 Answers  


Initially question was asked to mention the types of indexes. Then asked about BITMAP INDEX and B-Tree Index

2 Answers   Polaris,


Categories