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...


What is the difference between primary key & unique index ?

Answers were Sorted based on User's Feedback



What is the difference between primary key & unique index ?..

Answer / shankar

Primary Key cannot have NULL values in it wherein an
UNIQUE index can have one NULL value in it.

Is This Answer Correct ?    37 Yes 3 No

What is the difference between primary key & unique index ?..

Answer / mani

Primary key can be defined only one for a table whereas
number of unique indexes can be defined for a table.

primary key can not have null values but unique can have
null values and to remind one null value can never be equal
to another null value.

Is This Answer Correct ?    23 Yes 4 No

What is the difference between primary key & unique index ?..

Answer / uddipto banerji

1. Primary Key is a column or a set of columns that uniquely identifies a row.Its purpose RECORD UNIQUENESS
2. Primary Key will not allow duplicate values.
3. Primary Key will not allow null.
4. Primary Key is not compulsory but recommended.
5. Primary Key helps to identify one record from another.
6. Only One Primary Key is allowed per table.
7. Unique Indexes is created automatically if there is Primary Key.
8. One table can combine upto 16 columns in a Composite Primary Key.
9. A table can have more than one Unique Key which is not possible in a Primary Key.

Is This Answer Correct ?    10 Yes 2 No

What is the difference between primary key & unique index ?..

Answer / palash ghosh

1)Primary key creates an implicit culstered index on a
table, unique key does not create any implicit index.
2)Columns defined as primary key does not allow null values,
where as columns defined as unique can allow null values.
3)A table can have just one primary key (can be a composite
key) where as there can be multiple unique columns (keys).
4)Primary key is a unique key with the above mentioned
features.

Is This Answer Correct ?    9 Yes 1 No

What is the difference between primary key & unique index ?..

Answer / mehdee

- Each primary key must associate with a unique index, but
unique index dose not have to associate to the primary key.

Is This Answer Correct ?    6 Yes 3 No

What is the difference between primary key & unique index ?..

Answer / s

Primary Key uniquely identifies the record and the UNIQUE
index on the primary key ensures that no duplicates values
will be stored in the table.

Is This Answer Correct ?    16 Yes 14 No

Post New Answer

More DB2 Interview Questions

What is the SQL query to select, delete and get count of duplicate rows in DB2?

2 Answers  


Is db2 a programming language?

0 Answers  


How we create a tables in DB2 ?Previously client has using 7 letters for user id,now he wants to increase the letters from 7 to 12 for user id.How we can do it?

6 Answers   Wipro,


What is precompiler in db2?

0 Answers  


What is the meaning of -805 SQL return code?

3 Answers  


Write a query to retrive partial string.

2 Answers  


What is a synonym ?

2 Answers  


Explain the use of the WHERE clause.

2 Answers   IBM,


define clustering index.

0 Answers  


I have two tables A and B. Both tables are connected with SSN number as foreign key. I want to retrieve a column data from B table. How will you write a query?

3 Answers   CTS,


I have a table(product),It contain fields(productname,cost). I want to retrieve the product name ,which cost is second maximum in the table?

10 Answers   Fidelity,


How to define the a field which accepts value till 99999.99 in db2

3 Answers  


Categories