-1

当我尝试从批处理文件运行一些查询时,我在查询浏览器中收到一些错误消息

我试过了

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;

以及更多类似的陈述

这背后的原因是什么??

4

1 回答 1

1

sourcemysqlCLI 命令 - 不是 SQL 查询命令。它仅适用于命令行客户端mysql

https://dev.mysql.com/doc/refman/5.7/en/mysql-batch-commands.html

于 2012-10-26T14:09:49.233 回答