【发布时间】:2012-10-26 13:21:48
【问题描述】:
当我尝试从批处理文件中运行一些查询时,我在查询浏览器中收到了一些错误消息
我试过了
source E:\Rename_scripts_unused_tables_msp.sql
我收到类似
的错误消息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 'source E:\Rename_scripts_unused_tables_msp updated.sql' at line 1'
并且查询在命令行中运行良好。
这是我的源文件语句:
rename table appliance_backup_usage_history to unused_appliance_backup_usage_history;
rename table backup_core_server to unused_backup_core_server;
rename table bdr_vms to unused_bdr_vms;
rename table client_details1 to unused_client_details1;
rename table client_service_technologies_backup to unused_client_service_technologies_backup;
rename table cloud_instances to unused_cloud_instances;
还有更多类似的语句
这背后的原因是什么??
【问题讨论】:
-
我们需要查看源文件
-
文件是否包含
use somedatabase;? -
是的,它在命令行中运行良好(我已经选择了数据库,然后运行了脚本)
标签: mysql database restore database-administration