1064:You have ansyntax error typein your SQL syntax请问该怎么改呢

mysql 触发器 #1064 - You have an error in your SQL check the manual that corresponds to your My
mysql 触发器 #1064 - You have an error in your SQL check the manual that corresponds to your My
#1064 - You have an error in your SQL check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line
&提示这个错误! 超级郁闷!
CREATE TRIGGER `test`.`insert_all` AFTER INSERT ON `test`.`yy`&FOR EACH ROW if NEW.id&0 thenINSERT INTO triggeruse( `selectname` , `getid` , `gettype` ) VALUES (NEW.aa, NEW.id, 1);update triggeruse set backvalue=(selectname-1) where getid=NEW.INSERT INTO yy_triggerSET `id` = NEW.id,
`aa`=(select selectname from triggeruse where gettype=1 and getid=NEW.id);end if
不能运行! 每次都要拆来 编辑后组合到一起! 比如先:
CREATE TRIGGER `test`.`insert_all` AFTER INSERT ON `test`.`yy`&FOR EACH ROW INSERT INTO triggeruse( `selectname` , `getid` , `gettype` ) VALUES (NEW.aa, NEW.id, 1);
成功后再编辑:
CREATE TRIGGER `test`.`insert_all` AFTER INSERT ON `test`.`yy`&FOR EACH ROW if NEW.id&0 thenINSERT INTO triggeruse( `selectname` , `getid` , `gettype` ) VALUES (NEW.aa, NEW.id, 1);update triggeruse set backvalue=(selectname-1) where getid=NEW.INSERT INTO yy_triggerSET `id` = NEW.id,
`aa`=(select selectname from triggeruse where gettype=1 and getid=NEW.id);end if
然后就可以了! 而且还不能用 begin end
不区分大小写匿名
触发器这个东西我感觉还是少用为妙,因为它对程序移植性会产生影响,数据库,就让它实现存贮功能就完了.
主要是数据量太大了!几千万条
想拆一个表出来! 在程序里写太麻烦了! 每次改动都要修改N多文件。
相关知识等待您来回答
编程领域专家当前位置: &
求翻译:ERROR ) at line 114: You have an error in your SQL check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'radacct'': Got error 28 from st' at line 1是什么意思?
ERROR ) at line 114: You have an error in your SQL check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysqldump: Couldn't execute 'SHOW TRIGGERS LIKE 'radacct'': Got error 28 from st' at line 1
问题补充:
正在翻译,请等待...
在线114的错误) :您有一个错误在您的SQL句法;检查对应于您的正确的句法的MySQL服务器版本于用途近‘mysqldump的指南:不能执行‘象‘radacct的”展示触发器:从st的有的错误28’在线1
错误) 在线114 : 您有一个错误在您的SQL句法; 检查对应于您的MySQL服务器版本为正确的句法于用途近‘mysqldump的指南: 不能执行‘展示触发器象‘radacct " : 得到的错误28从st在线1
在行 114 错误 ): 在您的 SQL 语法 ; 有错误检查对应于您为要使用附近的正确语法的 MySQL 服务器版本的手册 '了 mysqldump: 不能执行' 显示触发器像 ' radacct ': 错误 28 接到 st' 在 1 号线
错误]在线114:您有一个错误在您的SQL语法;检查手册,对应于您的MySQL服务器版本,可右键语法使用靠近“用mysqldump:无法执行“显示触发器就像“radacct”:获得错误28从ST的1行
我来回答:
参考资料:
* 验证码:
登录后回答可以获得积分奖励,并可以查看和管理所有的回答。 |
我要翻译和提问
请输入您需要翻译的文本!#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL serve
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL serve
CREATE TABLE `adwacimage` ( `imageId` int( 11 ) NOT NULL AUTO_INCREMENT ,`userId` int( 11 ) DEFAULT NULL ,`imageapp` varchar( 200 ) DEFAULT NULL ,`imagetype` varchar( 50 ) DEFAULT NULL ,`imagepath` varchar( 50 ) DEFAULT NULL ,PRIMARY KEY ( `imageId` ) ) ENGINE = InnoDB AUTO_INCREMENT =52DEFAULT CHARSET = utf8;
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 'DEFAULT CHARSET=utf8' at line 8 我在PHPMYADMIN中导入数据时出现这样的错误。该如何修改?
不区分大小写匿名
相关知识等待您来回答
外语领域专家Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
I am trying to create a new table and I keep getting a #1064 error message. I have done some research and I have not been able to come up with a solution. I am using version 5.5.32. I am very new to SQL, reading books/reading online and if it is something really basic I apologize in advance, but I really can't figure out what is incorrect. Thanks for your help.
Here is my error message:
#1064 - You have an error in your SQL check the manual that
corresponds to your MySQL server version for the right syntax to use near
'CREATE TABLE table_1 ( id INT NOT NULL AUTO_INCREMENT, fname VARCHAR(30) '
Here is my code:
USE contact_us
CREATE TABLE table_1 (
id INT NOT NULL AUTO_INCREMENT,
fname VARCHAR(30) NOT NULL,
lname VARCHAR(30) NOT NULL,
coName VARCHAR(50) NOT NULL,
phone VARCHAR(11) NOT NULL,
ext VARCHAR(10) NOT NULL
street VARCHAR(50) NOT NULL,
city VARCHAR(30) NOT NULL,
state VARCHAR(30) NOT NULL,
zip VARCHAR(10) NOT NULL,
email VARCHAR(50) NOT NULL,
website VARCHAR(50) NOT NULL,
PRIMARY KEY(id)
) ENGINE=INNODB;
closed as off-topic by , , , ,
This question appears to be off-topic. The users who voted to close gave this specific reason:
&This question was caused by a problem that can no longer be reproduced or a simple typographical error. While similar questions may be on-topic here, this one was resolved in a manner unlikely to help future readers. This can often be avoided by identifying and closely inspecting
before posting.& & Clockwork-Muse, cha, Raging Bull, Shankar Damodaran, Rook
If this question can be reworded to fit the rules in the , please .
Give a space between use DB and create table (separate both the commands with ;) like
USE contact_
CREATE TABLE table_1 (
id INT NOT NULL AUTO_INCREMENT,
fname VARCHAR(30) NOT NULL,
lname VARCHAR(30) NOT NULL,
coName VARCHAR(50) NOT NULL,
phone VARCHAR(11) NOT NULL,
ext VARCHAR(10) NOT NULL
&-- Missing comma "," here
street VARCHAR(50) NOT NULL,
city VARCHAR(30) NOT NULL,
state VARCHAR(30) NOT NULL,
zip VARCHAR(10) NOT NULL,
email VARCHAR(50) NOT NULL,
website VARCHAR(50) NOT NULL,
PRIMARY KEY(id)
) ENGINE=INNODB;
20.8k41848
Not the answer you're looking for?
Browse other questions tagged
Stack Overflow works best with JavaScript enabled

我要回帖

更多关于 js syntax error 的文章

 

随机推荐