Difference between primary key and unique key ?
Answer Posted / priyranjan das
The basic differences between Primary Key and Unique key are as follows.
1) By default Primary Key will generate Clustured Index
whereas Unique Key will Generate Non-Clustured Index.
2) Primary Key is a combination of Unique and NOT NULL Constraints so it can’t
have duplicate values or any NUll
Whereas for Oracle UNIQUE Key can have any number of NULL whereas for SQL
Server It can have only one NULL
3) A table can have only one PK but It can have any number of UNIQUE Key.
Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?
How many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?
How to omit columns with default values in insert statement in oracle?
How to convert a string to a date in oracle database?
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
List the various oracle database objects?
What is query image?
ABOUT IDENTITY?
What is the parameter mode that can be passed to a procedure?
How to define an anonymous procedure with variables?
What are the types of trigger in oracle?
Is truncate autocommit in oracle?
How to grant create session privilege to a user in oracle?
Which dictionary tables and/or views would you look at to diagnose a locking issue?
How do I spool in oracle?