
- Forum
- Databases
- SQL what is the difference between Primary Key and Index Key ?
-
Junior Member
what is the difference between Primary Key and Index Key ?
Hello Frens....
Can anyone tell me the difference between primary key and index key ?
when shud we use primary key and when shud we use index key
Thanx in advance
Regards,
Satish...
-
Re: what is the difference between Primary Key and Index Key ?
Primary key is the field which is used to enforce both uniqueness and not-null to the specified . In a table there can be maximum only one primary key. Eventhough you have the option of creating composit primary key which can be based on a maximum 32 fields as per 10.2.0.1.0 version.
Index is the logical mapping of data in the column like index of a large book which helps us to directly jump in the required location for data manipulations.
Primary key it self works as an index.
Primary key and indexes are automatically used by the system when the field is part of the query. Sometimes we can pass hint to optimizer, to specify to use a particular index .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules