插入数据时候,引用了数据库名,数据库名中有横线,会提示错误:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right sy ntax to use near '-all.db1(operationuser,operationtime,notes,ebay_id,types)
解决办法:
把数据库名、表名都用反引号引起来就可以了。
比如:
insert into `db1`.`tbl1`(operationuser,operationtime,notes,ebay_id,types)(select operationuser,operationtime,notes,ebay_id,types from `db2`.`tbl2` where `operationtime` >1367337600 order by id asc);
最后
以上就是殷勤篮球最近收集整理的关于mysql 数据库名 横线_mysql 数据库名称,中间带有中划线问题的全部内容,更多相关mysql内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复