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
What will you get by the cursor attribute sql%notfound?
what are tables and fields? : Sql dba
What is a data manipulation language?
Can we use pl sql in sql server?
Why is sql better than hql?
Can we join two tables without common column?
How can you fetch common records from two tables?
What is the reports view in oracle sql developer?
What is a temporal data type?
What is an index? What are the types of indexes? How many clustered indexes can be created on a table?
how many triggers are allowed in mysql table? : Sql dba
How many sectors are in a partition?
What are the different dml commands in sql?
Can we connect to postgresql using sql developer?
What is the difference between syntax error and runtime error?