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
Why is the cursor important?
Which column in the user.triggers data dictionary view shows that the trigger is a pl/sql trigger?
What is the difference between instead of trigger and after trigger?
Which language is used in sql?
Why use stored procedures?
Why do we need databases?
What is the difference between python and sql?
What is parameter substitution in sql?
What is null in pl/sql?
how to select first 5 records from a table? : Sql dba
What is the use of partition by in sql?
What does partition by mean in sql?
What is raid? How does it help storage of databases?
What is nosql vs sql?
What is pl sql architecture?