We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Create index in access table

hidrau
hidrau asked
on
Medium Priority
228 Views
Last Modified: 2010-04-05
Hello guys

How could I create an index in an  access table?

Something like this:

create index ....

thanks

Comment
Watch Question

Commented:
try this

CREATE UNIQUE INDEX IndexName ON TableName ([FieldName])

Author

Commented:
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?
Commented:
Do this

CREATE INDEX IndexName on TableName ([FieldName])


In this case, we are not specifying UNIQUE.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
ah i see

Author

Commented:
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?

Tomas Helgi JohannssonDatabase Administrator / Software Engineer
CERTIFIED EXPERT
Commented:
DROP INDEX IndexName;
COMMIT;
CREATE INDEX IndexName on TableName([FieldName];
COMMIT;

Regards,
  TOmas Helgi

Author

Commented:
thanks very much
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.