由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Database版 - Problem when using SQL " Insert...." to AutoNumber.
相关主题
MS T-SQL 问题请教大牛一道有趣的SQL题
[转载] Can anyone interpret this simple SQL?紧急求助, 关于SQL Server
今典问题: 这个Self Query咋写?如何把某些行的某个列(unique)的值加1?
Access门外汉问题求教a simple question about T-SQL
Merge table with one single query?Help on Sql server huge table performance
SQL Conditional SelectSQL-Help!
问一个SQL Server的问题How to insert a string into table? Thanks
谁给我优化一下把重复的产品下架的SQLJDBC<======================>Oracle8i
相关话题的讨论汇总
话题: insert话题: autonumber话题: sql话题: problem话题: when
进入Database版参与讨论
1 (共1页)
z****g
发帖数: 2497
1
I use SQL "Insert" to fill data into an Access *.mdb file.
And in the field "CompID", I set it as AutoNumber,
it should fill itself automatic when you fill in data in
database.
But it doesn't work when use Insert. It need me to put a
value to that field too. So, it is not automatic.
How to solve this problem?
Thanks for help!
s***l
发帖数: 9
2

I am not clear to ACCESS. But in SQL SERVER 7.0, you can
simply omit the field when inserting new values.

【在 z****g 的大作中提到】
: I use SQL "Insert" to fill data into an Access *.mdb file.
: And in the field "CompID", I set it as AutoNumber,
: it should fill itself automatic when you fill in data in
: database.
: But it doesn't work when use Insert. It need me to put a
: value to that field too. So, it is not automatic.
: How to solve this problem?
: Thanks for help!

a*****a
发帖数: 438
3
i just tried and it worked..
I created a table CompCEO with two columns, 'CompID'
(autonumber) and 'CEOName'(text).
then I inserted two records by:
INSERT INTO CompCEO VALUES (1, "amnesia")
INSERT INTO CompCEO (CEOName) VALUES ("amnesia")
SELECT * FROM CompCEO
everything works.

【在 z****g 的大作中提到】
: I use SQL "Insert" to fill data into an Access *.mdb file.
: And in the field "CompID", I set it as AutoNumber,
: it should fill itself automatic when you fill in data in
: database.
: But it doesn't work when use Insert. It need me to put a
: value to that field too. So, it is not automatic.
: How to solve this problem?
: Thanks for help!

1 (共1页)
进入Database版参与讨论
相关主题
JDBC<======================>Oracle8iMerge table with one single query?
Special character in insert valuesSQL Conditional Select
请教一个sql server的问题问一个SQL Server的问题
how to include record deleted date into trigger?谁给我优化一下把重复的产品下架的SQL
MS T-SQL 问题请教大牛一道有趣的SQL题
[转载] Can anyone interpret this simple SQL?紧急求助, 关于SQL Server
今典问题: 这个Self Query咋写?如何把某些行的某个列(unique)的值加1?
Access门外汉问题求教a simple question about T-SQL
相关话题的讨论汇总
话题: insert话题: autonumber话题: sql话题: problem话题: when