无法创建表-错误1064(42000):SQL语法错误 [英] Unable create a table - ERROR 1064 (42000): You have an error in your SQL syntax

查看:345
本文介绍了无法创建表-错误1064(42000):SQL语法错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试执行以下简单命令:

I'm trying to execute this simple command:

create table foo
(clo int primary key unsigned auto_increment);

但是我得到这个错误:

错误1064(42000):您有一个错误 在您的SQL语法中;查看手册 对应于您的MySQL服务器 使用正确语法的版本 在'unsigned auto_increment)附近 第2行

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 'unsigned auto_increment)' at line 2

推荐答案

我尝试将intunsigned放在一起,并且效果很好:

I tried putting int and unsigned together and it worked fine:

create table foo
(clo int unsigned primary key auto_increment );

这篇关于无法创建表-错误1064(42000):SQL语法错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆