sql脚本注释问题

来源:互联网 发布:java 多线程 回调函数 编辑:程序博客网 时间:2024/06/07 16:45
-- ------------------------------ Table structure for `t_col_test`-- ----------------------------DROP TABLE IF EXISTS `t_col_test`;CREATE TABLE `t_col_test` (  `idx` int(11) NOT NULL AUTO_INCREMENT,  `name` varchar(20) DEFAULT NULL,  `mark` varchar(20) DEFAULT NULL,  PRIMARY KEY (`idx`)) ENGINE=InnoDB DEFAULT CHARSET=utf8;-- ------------------------------ Records of t_col_test-- ------------------------------INSERT INTO `t_col_test` VALUES(3,'test','ddd')
脚本中执行上述代码总是报错[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 '--INSERT INTO `t_col_test` VALUES(3,'test','ddd')' at line 5最后检查发现是注释的插入语句写错了,注释 -- 后面需要有个空格