Solved

Create index in access table

Posted on 2006-11-07
7
211 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

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!

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…

689 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