MS ACCESS如何使用主键删除列 [英] MS ACCESS How to drop a column with primary key
本文介绍了MS ACCESS如何使用主键删除列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在访问中从表中删除一列,这是主键. 我如何为此编写查询.
I want to drop a column from table in access which is the primary key. how can i write a query for this.
推荐答案
您需要在一个查询中首先删除表上的主键索引:
You need to remove the primary key index on the table first in one query:
DROP INDEX PrimaryKey ON Table1
然后,您可以在第二个查询中删除该列:
Then you can remove the column in a second query:
ALTER TABLE Table1 DROP COLUMN id
这篇关于MS ACCESS如何使用主键删除列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文