DROP PRIMARY KEY

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there ... I want to DROP a PRIMARY KEY from an access table before I can
add a new one ... The code I have now is ...
ALTER TABLE info DROP PRIMARY KEY
but that doesn't seem to work ... Can anyone please help me with this?
 
Hi there ... I want to DROP a PRIMARY KEY from an access table before I can
add a new one ... The code I have now is ...
ALTER TABLE info DROP PRIMARY KEY
but that doesn't seem to work ... Can anyone please help me with this?

Try

ALTER TABLE info DROP INDEX PrimaryKey;

The index is just named PrimaryKey by default - there may be an index with a
primary key property that has a different name, but only if you did so
yourself.

John W. Vinson [MVP]
 
John W. Vinson said:
Try

ALTER TABLE info DROP INDEX PrimaryKey;

The index is just named PrimaryKey by default - there may be an index with a
primary key property that has a different name, but only if you did so
yourself.

John W. Vinson [MVP]

That didn't quite work, I got this error ... Error in ALTER TABLE statement
and the word INDEX was highlighted.

I then tried
DROP INDEX num ON info ... but then I get this message ... no such index
'num' on table 'info'

And then I just started playing around and this worked ...
DROP INDEX PrimaryKey ON info;

Thanx for everything
 
Back
Top