0

我有一个到远程 SQL 服务器的 SQL 连接,并且想运行一个查询,结果存储在一个输出文件中。问题是我想将文件本地保存在我的机器上。

我该怎么做呢?

4

2 回答 2

0

Run the query, fetch the results in a array and store the array to a text file on your machine.

于 2014-08-01T08:54:36.200 回答
-2

你可以运行这个:

mysql -hlocalhost -uroot -p -e "SELECT * FROM database.table;">C:\result.txt
于 2014-08-01T09:19:34.163 回答