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 has stored procedures in sql and how we can use it?

0 Answers  


write the Sql query for creating database backup?

7 Answers   TCS,


What is Primary Key?

4 Answers   Ramco,


What is a common use of group by in sql?

0 Answers  


What are the different sql commands?

0 Answers  






What is query optimization in sql?

0 Answers  


which operator is used in query for pattern matching? : Sql dba

0 Answers  


What is exit statement?

0 Answers  


What is trigger price?

0 Answers  


Explain ddl statements in pl/sql?

0 Answers  


Can a table contain multiple foreign key’s?

0 Answers  


How did you export data from database to excel file.

1 Answers   TCS,


Categories