what is difference between unique index and primary index

HI,

Please tell me why we assign the unique index to primary index? Bcz When we create the unique index in indexes it will stop the duplicate values so why we assing the unique indexes to primary index?

I think…that since indexes also contains sorting rules, the primary index will be used in all grids. So the index you select as primary, will affect how grids ar sorted by default.

please any budy tell me It is correct or not ?

I can’t believe that all these ERP developers don’t know database fundamentals…

http://www.lmgtfy.com/?q=database+fundamentals

Come on people, learn the basics! There have been at least two more discussions about this recently here on DUG about this topic.

Here’s a useful site: http://databases.about.com/od/administration/tp/beginners_faq.htm


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

1)Primary key creates an implicit clustered 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

Amol