-
ALTER TABLE
I want to remove the primary key in a Ms Access table.
I tried "ALTER TABLE DROP CONTRAINT PRIMARY KEY", but error occur, could
anyone pls tell me what's wrong with it?
-
Re: ALTER TABLE
"tom" <tom.com@asia.com> wrote:
>
>I want to remove the primary key in a Ms Access table.
>I tried "ALTER TABLE DROP CONTRAINT PRIMARY KEY", but error occur, could
>anyone pls tell me what's wrong with it?
Tom,
The command you're trying is not correct. You have to declare the constraint's
name used to form the primary key. For sample:
ALTER TABLE TAB1 DROP CONSTRAINT Fk_Tab1;
Is the correct command to drop the primary key of a tab (Tab1) created
this way:
CREATE TABLE Tab1
(
field1 integer not null,
field2 text,
constraint Fk_Tab1 primary key (field1)
)
I hope it helps! :-)
Filipo
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|