在高速匝道入口倒车:sql语句错误在哪?创建不了帮我看看。

来源:百度文库 编辑:高校问答 时间:2024/04/28 10:40:47
create table dede_diaocha1 ( Id int(20) not null AUTO_INCREMENT )ENGINE=MyISAM DEFAULT CHARSET=gbk
错误提示:Incorrect table definition; there can be only one auto column and it must be defined as a key

错误提示:Incorrect table definition; there can be only one auto column and it must be defined as a key

这个提示是说啊,如果你把一个字段当作auto increment
比必须把这个字段作为索引(key)

int型长度固定,不用指定20 ,id int就行了,
看你好像要用自动编号吧
[ID] [decimal](18, 0) IDENTITY (1, 1) NOT NULL
肯定行

create table dede_diaocha1 (Id NUMBER(20) not null)

后面什么乱七八糟的?不明白你要干什么。