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 ...
随机推荐
- Linux上设置nginx支持https
1.前提条件 如果系统没有自带openssl,则需要安装. 2.生成证书 # .首先,进入你想创建证书和私钥的目录,例如: cd /etc/nginx/ # .创建服务器私钥,命令会让你输入一个口令: ...
- tcp/ip的一些概念
MTU,即Maximum Transmission Unit(最大传输单元),此值设定TCP/IP协议传输数据报时的最大传输单元.以太网的MTU值是1500 bytes. 首先计算最大的IP包中IP净 ...
- DNS主从服务,子域授权,view视图,日志系统,压力测试
DNS主从服务,子域授权,view视图,日志系统,压力测试 DNS性能测试工具queryperfDNS查询过程: DNS主从建立: 环境: 主服务器:10.140.165.93 从服务器:10.140 ...
- 使用OpenCV3处理图像
不同色彩空间的转换 当前,在计算机视觉中有三种常用的色彩空间:灰度.BGR.以及HSV(Hue,Saturation,Value) 灰度色彩空间是通过去除彩色信息来将其转换成灰阶,灰度色彩空间对中间处 ...
- java 继承多态的一些理解不和不理解
1.向上转型的一个误区 一直以为Child 继承Parent以后, Parent p = new Child(); p可以调用Child类中拓展Parent的方法,原来必须在强制转换成Child类才 ...
- sql把一个表数据插入到另一张表
把一个表数据插入到另一张表 insert into tableB (field1,field2,field3,field4) select field1,field2,field3,'val4' fr ...
- 开发VR游戏的基本要求
由于我对VR技术的兴趣,我特意去网上查找了一下如果要从事VR游戏的开发,程序员要掌握的一些能力和要求.可能不太详细,只供参考. 1. C++ 语言必须过关,现在大部分的3dengine都用c++,不管 ...
- 团队项目——站立会议 DAY1
团队项目--站立会议 DAY1 团队成员介绍(5人):张靖颜.何玥.钟灵毓秀.赵莹.王梓萱 今日(2016/5/6)为站立会议的第一天,一起对团队项目进行讨论,并对每个人的 ...
- Bluetooth Low Energy——蓝牙低功耗
Android4.3(API级别18)引入内置平台支持BLE的central角色,同时提供API和app应用程序用来发现设备,查询服务,和读/写characteristics.与传统蓝牙(Classi ...
- C#课外实践——校园二手平台(心得篇)
先声明一下,现在回头看一下自己做的小程序,感觉很不怎么地.但是通过这次的实践明白了很多的东西.至于程序实现的什么给你,通过名字就可以猜出来.不过,是客户端的.我想,这应该是我见过的第一个以客户端为模式 ...