-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 クエリ コマンドではありません。コマンド ライン client を使用した場合にのみ機能しますmysql

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

于 2012-10-26T14:09:49.233 に答える