【发布时间】:2009-04-21 07:43:56
【问题描述】:
我在运行INSERT 语句时遇到问题,其中有一个自动编号作为 PK 字段。我有一个自动递增的long 作为主键,然后是double 类型的4 个字段;然而 Access(使用 ADO)似乎需要五个值用于插入语句。
INSERT INTO [MY_TABLE] VALUES (1.0, 2.0, 3.0, 4.0);
>> Error: Number of query values and destinations fields are not the same.
INSERT INTO [MY_TABLE] VALUE (1, 1.0, 2.0, 3.0, 4.0);
>> Success!!
如何使用自动编号来实际自动编号?
【问题讨论】:
标签: sql ms-access insert ado autonumber