Solved

Create index in access table

Posted on 2006-11-07
7
210 Views
Last Modified: 2010-04-05
Hello guys

How could I create an index in an  access table?

Something like this:

create index ....

thanks

0
Comment
Question by:hidrau
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 33

Expert Comment

by:hongjun
ID: 17889490
try this

CREATE UNIQUE INDEX IndexName ON TableName ([FieldName])
0
 
LVL 1

Author Comment

by:hidrau
ID: 17889715
this fieldname will have duplicated row. In access there is an option to allow or not duplicated rows, Mustn't I do this in the sql line?
0
 
LVL 33

Accepted Solution

by:
hongjun earned 300 total points
ID: 17889779
Do this

CREATE INDEX IndexName on TableName ([FieldName])


In this case, we are not specifying UNIQUE.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:hidrau
ID: 17890525
ah i see
0
 
LVL 1

Author Comment

by:hidrau
ID: 17890613
I forgot to tell you that I need to check whether there is already an index created or not.

Do you have any Ideia how to do that?

0
 
LVL 25

Assisted Solution

by:Tomas Helgi Johannsson
Tomas Helgi Johannsson earned 200 total points
ID: 17896735
DROP INDEX IndexName;
COMMIT;
CREATE INDEX IndexName on TableName([FieldName];
COMMIT;

Regards,
  TOmas Helgi
0
 
LVL 1

Author Comment

by:hidrau
ID: 17897435
thanks very much
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question