adspace


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

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is dbms? : Sql dba

1070


what is schema? : Sql dba

1163


what are aggregate and scalar functions? : Sql dba

1142


Is primary key clustered index?

1028


Can we rollback truncate?

1083


Can we use distinct and group by together?

1146


how to start mysql server? : Sql dba

1279


What is the best sql course?

1064


Can delete statement be rollbacked?

1065


What is the current version of postgresql?

1188


Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me

2102


If a cursor is open, how can we find in a pl/sql block?

1252


define sql insert statement ? : Sql dba

1110


how to use regular expression in pattern match conditions? : Sql dba

1125


Is primary key always clustered index?

1101