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 not in sql?
What has stored procedures in sql and how we can use it?
What is pl sql and why it is used for?
What are types of exception?
What is integrity in sql?
how to enter binary numbers in sql statements? : Sql dba
what is datawarehouse? : Sql dba
Can we use ddl statements in stored procedure sql server?
Can cursors be part of a trigger body?
what are enums used for in mysql? : Sql dba
Explain the commit statement.
What is dcl in sql?
How to disable a trigger name update_salary?
what is offset-fetch filter in tsql? : Transact sql
what are all the different normalizations? : Sql dba