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
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 |
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 |
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 |
What has stored procedures in sql and how we can use it?
write the Sql query for creating database backup?
What is Primary Key?
What is a common use of group by in sql?
What are the different sql commands?
What is query optimization in sql?
which operator is used in query for pattern matching? : Sql dba
What is exit statement?
What is trigger price?
Explain ddl statements in pl/sql?
Can a table contain multiple foreign key’s?
How did you export data from database to excel file.