Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Difference between primary key and unique key ?

Answers were Sorted based on User's Feedback



Difference between primary key and unique key ?..

Answer / 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

Difference between primary key and unique key ?..

Answer / 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

Difference between primary key and unique key ?..

Answer / kundn

Unique key Primary key
1. Can have null value 1. Can not have null value
2.Table can have multiple 2. Table Can have multiple unique
Unique keys keys
3Single column at a time 3. May be combination of one or
or more columns

Is This Answer Correct ?    14 Yes 17 No

Difference between primary key and unique key ?..

Answer / ajoy

primary key and unique key both can be referenced to other
table as foreign key. please check this error message

ORA-02270: no matching unique or primary key for this
column-list

Is This Answer Correct ?    4 Yes 7 No

Difference between primary key and unique key ?..

Answer / guna

there is only one primary key for one table;
it can not acept null values;
any no uniquefor a table;
it can accept null values;
which the rows are unique value;

Is This Answer Correct ?    9 Yes 18 No

Difference between primary key and unique key ?..

Answer / vitthal parkar

Unique key Primary key
1. Can have null value 1. Can not have null value
2.Table can have multiple 2. Table Can have multiple unique
Unique keys keys
3Single column at a time 3. May be combination of one or
or more columns

Is This Answer Correct ?    35 Yes 58 No

Difference between primary key and unique key ?..

Answer / gfgfgf

464565

Is This Answer Correct ?    7 Yes 65 No

Post New Answer

More Oracle General Interview Questions

What are a collation and state the different types of collation sensitivity?

0 Answers  


what are the default admin accounts in Oracle 10g ?

0 Answers   MCN Solutions,


Other than making use of the statspack utility, what would you check when you are monitoring or running a health check on an Oracle 8i or 9i database?

0 Answers  


How to pass a cursor variable to a procedure?

0 Answers  


What is bulk load in oracle?

0 Answers  


What is Trigger in Oracle?

0 Answers   MCN Solutions,


can you call insert/update/delete in select statements. If yes how? If no what is the other way?

2 Answers  


What is a Synonym ?

3 Answers  


What are the different approaches used by Optimizer in choosing an execution plan ?

2 Answers  


6. Display the client name and order date for all orders using the traditional method.

0 Answers   Wipro,


Assuming today is Monday, how would you use the DBMS_JOB package to schedule the execution of a given procedure owned by SCOTT to start Wednesday at 9AM and to run subsequently every other day at 2AM.

0 Answers  


What happens to the data files if a tablespace is dropped?

0 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1809)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)