 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
hilz Guest
|
Posted: Mon Dec 13, 2004 10:30 pm Post subject: indexes in MsAccess |
|
|
Hi all. i know this is not directly related to java databases, but i thought
this might be a good place to ask.
I have a table in MsAccess that i created as follows:
create table ITEM (
ITEM_ID COUNTER PRIMARY KEY,
ITEM_NAME CHAR(255) UNIQUE,
ITEM_DESCRIPTION CHAR(255)
)
I need to drop the unique index on the ITEM_NAME, and i don't know its name.
so how would i do that(using SQL).
is there a way to get the names of all indexes on the table ITEM, and select
the one i want?
or is there another way to do that?
thank you for any help.
hilz
|
|
| Back to top |
|
 |
hilz Guest
|
Posted: Wed Dec 15, 2004 6:10 pm Post subject: Re: indexes in MsAccess |
|
|
"Noel" <no.spam (AT) thank (DOT) you> wrote
| Quote: | On Mon, 13 Dec 2004 17:30:19 -0500, "hilz" <no.w@y.com> wrote:
Hi all. i know this is not directly related to java databases, but i
thought
this might be a good place to ask.
I have a table in MsAccess that i created as follows:
create table ITEM (
ITEM_ID COUNTER PRIMARY KEY,
ITEM_NAME CHAR(255) UNIQUE,
ITEM_DESCRIPTION CHAR(255)
)
I need to drop the unique index on the ITEM_NAME, and i don't know its
name.
so how would i do that(using SQL).
is there a way to get the names of all indexes on the table ITEM, and
select
the one i want?
or is there another way to do that?
It is not really the place for this question, but here goes anyway.
ALTER TABLE ITEM ALTER COLUMN ITEM_NAME CHAR(255);
|
Noel:
I appreciate your help. Your suggestion did not really get rid of that
un-named index.
I even tried to recreate a new unique index and give it a name, and then
drop that index, thinking that when i do that, it will replace the existing
unnamed one, but that did not work either. this is what i did:
ALTER TABLE ITEM ALTER COLUMN ITEM_NAME CHAR(255) CONSTRAINT UNIQUENAME1
UNIQUE;
DROP INDEX UNIQUENAME1 ON ITEM;
the old un-named unique index still existed.
any other ideas?
thank you
hilz
|
|
| Back to top |
|
 |
Evelyn V Stevens Guest
|
Posted: Fri Dec 17, 2004 10:12 pm Post subject: Re: indexes in MsAccess |
|
|
Hi,
The un-named index -probably- defaulted to the column name. If that
doesn't work in your ALTER TABLE statement, see whether you can find the
name by using the Documenter in Access:
Tools
Documenter
Tables (select only the table in question)
Options (turn off all options (set to None) except Names and
Properties under Indexes - otherwise the documenter
returns way too much data)
Hope this helps,
Evelyn
--
Evelyn V. Stevens, Ph.D. E-mail: [email]evelyn (AT) udel (DOT) edu[/email]
Information Technologies-User Services
U. of Delaware, Newark, DE 19716 Phone: 302-831-4240
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|