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

Can a table contain multiple foreign key’s?

0 Answers  


What is acid property in a database?

0 Answers  


How many types of index are there?

0 Answers  


one of the column in my table contains the data like SAL ---- 1000 1000 2000 3000 3000 So my requirement is i want output like SAL --- 1000 2000 3000 it mean i want to delete duplicate rows in the table permanently and i want output in the above formatow should u write query?

13 Answers   Cap Gemini, TCS,


What is left join example?

0 Answers  






Can there be 2 primary keys in a table?

0 Answers  


How to perform a loop through all tables in pl/sql?

4 Answers   Evosys, MBT,


I want to create synonym for table emp but in my pc it is giving insufficient previliges.I am using user scott.Please suggest me.

3 Answers  


what is rdbms? : Sql dba

0 Answers  


what are the t string functions available in tsql? : Transact sql

0 Answers  


IF EMP HAS 2 ROWS,DEPT HAS 4 ROWS.WHATS THE RESULT OF SELECT * FROM EMP,DEPT;

1 Answers  


what is the difference between myisam static and myisam dynamic? : Sql dba

0 Answers  


Categories