MySql 执行语句错误 Err] 1064 - 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
关于用Power Designer 生成sql文件出现 错误 [Err] 1064 - 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 'int not null auto_increment comment '用户id',
的解决办法
sql语句如下
drop table if exists tb_users; /*==============================================================*/
/* Table: tb_users */
/*==============================================================*/
create table tb_users
(
userid national int not null auto_increment comment '用户id',
orgid int comment '组织id',
username varchar() not null comment '姓名',
account varchar() comment '账号',
password varchar() comment '密码',
sex varchar() comment '性别',
phone varchar() comment '电话',
duties varchar() comment '岗位职务',
mail varchar() comment '邮箱',
personstatus char default '' comment '人员状态(0在职,1离职)',
accountstatus char default '' comment '账号状态(0正常,1注销)',
enabletime datetime comment '账号登录有效时间',
newaddtime datetime comment '新增时间',
updatetime datetime comment '更新时间',
operater varchar() comment '操作人',
lastloadtime datetime comment '最后登录时间',
bz1 varchar() comment '备注1',
bz2 varchar() comment '备注2',
bz3 varchar() comment '备注3',
primary key (userid)
); alter table tb_users comment '用户表'; alter table tb_users add constraint FK_Reference_11 foreign key (orgid)
references tb_organize (orgid) on delete restrict on update restrict;
执行后出现如下错误,
[Err] 1064 - 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 'int not null auto_increment comment '用户id',
orgid int com' at line 6
解决办法:
是否发现执行的sql语句中多了个national关键字,把这个关键字去掉就可以。
在podwer designer 中设置如图:把前面对号去掉就可以
MySql 执行语句错误 Err] 1064 - 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的更多相关文章
- SQL语句报错:You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near
报错如图: 最开始其实我的列名tname和tsubject分别叫name和subject,后来看到网上有说这个报错可能是数据库建表的时候使用了mysql的关键词,我就只把name改了.后来还是这个问题 ...
- [Err] 1064 - 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 ''<h1 style="text-align: center;">php
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL s ...
- sql语句 异常 Err] 1064 - You have an error in your SQL syntax;
在我们开发的工程中,有时候会报[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds ...
- 插入mysql语句报错:1064 - 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
插入一个很简单的sql语句时候,mysql一直报错: [SQL] INSERT INTO ORDER ( id, activity_id, order_type, phone, order_amoun ...
- 插入数据库失败([Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version)
报错信息如下: , ) 原因,read是数据库的关键字, 牢记,如果一个词是数据库的关键字,那么在写数据库语句的时候,这个词一定是蓝色的(关键字颜色)!!
- 1064 - 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 'groups)VALUES('1','hh','hh@163.com','Boss')' at line 1
mysql8.0版本 在已存在的表里插入一条数据 insert INTO api_user(id,username,email,groups)VALUES('1','hh','hh@163.com', ...
- 解决ROR 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 'creat table study_record( id int(11) not null
之前一直用的好好的,突然就出现了这个错误: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual tha ...
- SQL Error: 1064, SQLState: 42000 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version
-- ::, WARN [org.hibernate.util.JDBCExceptionReporter:] - SQL Error: , SQLState: -- ::, ERROR [org.h ...
- C# Mysql 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 ????
有几年没用过MySql数据了,今天在使用C#访问MySql数据库时出现了一个小插曲. 错误提示: You have an error in your SQL syntax; check the man ...
随机推荐
- Web大文件上传控件-asp.net-bug修复-Xproer.HttpUploader6.2
版权所有 2009-2016荆门泽优软件有限公司 保留所有权利 官方网站:http://www.ncmem.com/ 产品首页:http://www.ncmem.com/webapp/up6.2/in ...
- SQL Server存储过程中防止线程重入处理方式
对于线程重入,在C#中有lock关键字锁住一个SyncObject,而SQL Server也可用一个表来模拟实现. 先创建一个同步表,相当于C#中的SyncObject,并插入一条记录(初始值为1) ...
- 使用wxPython WebView浏览器版本问题
使用CodeMirror和wxPyhton的WebView创建嵌入客户端的本地代码编辑工具. 版本为wxPython 3.0,CodeMirror 支持的浏览器IE8或以上. wxPython提供了H ...
- [UE4]武器碰撞
实现武器战斗伤害系统,击中时如何发出碰撞事件产生伤害,目前探索的有通过物理碰撞和LineTrace两种方法. 物理碰撞通过Overlap事件的方法,优点是易于实现,缺点是无法具体到碰撞骨骼位置,低帧数 ...
- LDO-XC6216C202MR-G
XC6216C202MR-G 1.改产品是特瑞士(TOREX)公司电源管理芯片,输入电压可达28V,输出可调23V,最大输出电流150mA.压差最小为300mV.该系列有固定式输出和可调式 ...
- Q114第一颗二叉查找树(链式)
输入n,然后n个树,建立二叉查找树.从小到大输出每个节点的左右子树,空输出# #include<cstdio> #include<iostream> using namespa ...
- 解決BufferedReader读取UTF-8文件中文乱码
解決BufferedReader读取UTF-8文件中文乱码 File rst01 = new File(context.getRealPath("/")+" ...
- [C#] 與Android共舞–透過GET方式傳資料給Server(含解決中文編碼問題) (转帖)
上一篇文章分享了透過POST 方式傳資料回Server,這一篇來談談有關於透過GET的方式傳遞 首先,如我預期的一樣,透過網址傳遞,會產生編碼問題,這邊我就順代解掉,希望有碰到的人 可以不用為此煩惱. ...
- IIS 7.5 + asp.net MVC4 设置路由处理URL请求
使用asp.net MVC4开发的网站,在本地的VS012环境下运行,一切正常.但当发布到Windows 2008 R2(IIS7.5 + Framework4.5)上时,访问相关网页时,出现有下面的 ...
- CentOS7 安装 mongodb
https://docs.mongodb.com/manual/tutorial/install-mongodb-enterprise-on-red-hat/