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 ? | 2 Yes | 1 No |
Post New Answer View All Answers
what is sql server agent? : Sql dba
Is primary key always clustered index?
If a cursor is open, how can we find in a pl/sql block?
what is bcp? When does it used? : Sql dba
what is collation? : Sql dba
What is the current version of sql?
Is primary key clustered index?
what are all the common sql function? : Sql dba
what are aggregate and scalar functions? : Sql dba
Does group by remove duplicates?
How do I remove duplicates in two columns?
Can we use distinct and group by together?
Is inner join faster than left join?
define sql insert statement ? : Sql dba
what is schema? : Sql dba