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
How many sql statements are used? Define them.
What does sql stand for?
Where is sql database stored?
How do I find duplicates in two columns?
Is sqlite free?
Why procedure is used in sql?
What are pl/sql packages?
What is assignment operator in pl sql?
What are its different types of dbms?
Is truncate ddl or dml?
How many tables can a sql database have?
Explain raise_application_error.
Why select is used in sql?
What are the sql commands?
What is the difference between count 1 and count (*) in a sql query?