mysql> create table c(id int primary key identity(1,1));
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'ident
ity(1,1))' at line 1
create table c(id int primary key identity(1,1)); 哪里写错了? 谢谢大家帮忙
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'ident
ity(1,1))' at line 1
create table c(id int primary key identity(1,1)); 哪里写错了? 谢谢大家帮忙
解决方案 »
- 存储过程求高人!~~~~总是进入死循环
- a later version of mysql server 5.5 is already installed
- ACMAIN_CHM,刚才那问题续
- MySQL:LOAD DATA IN FILE出错
- 批量所有表的主键设置成自动增长列,同时起始值为1000
- sql脚本 如何判断字段或表是否存在
- Mysql 5在linux下为什么会启动这么多进程?达人请指教。谢谢
- postgresql跨库触发器问题
- 请问有没有办法将一个数据库作两地共享,进行同时对数据库进行操作或查找.
- mysqldump有两个问题(bug?),不知道怎么解决
- MYSQL 删除主键出现错误!
- 创表出错。错误代码:1101
create table c(id int primary key auto_increment);
MySQL官方文档 http://dev.mysql.com/doc/refman/5.1/zh/index.html
Query OK, 0 rows affected (0.08 sec)mysql> show create table c;
+-------+------------------------------------------------
| Table | Create Table
+-------+------------------------------------------------
| c | CREATE TABLE `c` (
`id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-------+------------------------------------------------
1 row in set (0.00 sec)mysql>
create table c(id int primary key identity(1,1))
---mysql的写法如下
create table c
(id int primary key auto_increment);
sql server自增列 identity(1,1)