Difference between primary key and unique key ?
Answer Posted / dpkar
Primary Key:
Primary key will create column data uniqueness in the table.
Primary key will create clustered index by default
Only one Primay key can be created for a table
Multiple columns can be consolidated to form a single
primary key
It wont allow null values.
Unique Key :
Unique key constraint will provide you a constraint like
the column values should retain uniqueness.
It will allow null value in the column.
It will create non-clustered index by default
Any number of unique constraints can be added to a table.
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Explain about your project and its relation to the current job position you are applying to?
Explain oracle left join with an example?
How to create a testing table in oracle?
1) WIll all the user get the DEFAULT profile, if their current profile got deleted at any point of time? 2) What are the Situation we need to MOVE the TABLE between T.spaces? 3) What is the use of MOVING the TABLE between SCHEMA'S? 4) What are the Table Clause, Segment Clause and the Datafile Clause which will override each other? 5) Explain SORT_AREA_SIZE of Tempfile to make UNIFORM SIZE
Explain the function of optimizer in oracle?
what is Single Byte Overhead...?
What are the arithmetic operations?
How to login to the server without an instance?
What is the usage of control file in oracle?
How to do paging with oracle?
What is a sub query and what are the different types of subqueries?
List the various oracle database objects?
How to use "in out" parameter properly?
What is a synonym? What are its various types?
What spfile/init.ora file parameter exists to force the CBO to make the execution path of a given statement use an index, even if the index scan may appear to be calculated as more costly?