MYSQL tee syntax not working

谁说我不能喝 提交于 2021-02-05 10:23:41

问题


Can anyone help me with this? I am currently trying to write my queries to a file and I will eventually close it with notee; call. I have used the tee call before but for some reason today I am having problems.

Here is the syntax in question:

tee c:/trash/test.txt;
select*from customer;

Here is the Error:

Error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem.

ERROR: Unknown Punctuation String @ 6
STR: :/
SQL: tee c:/trash/test.txt;tee c:/trash/test.txt;tee c:/trash/test.txt;

SQL query:

tee c:/trash/test.txt;

MySQL said: Documentation

#1064 - 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 'tee c:/trash/test.txt' at line 1

The file trash has been created so I know that is not the issue.

Any help will be appreciated thank you.


回答1:


The tee and notee commands are only available in the MySQL command-line client. They are not handled by the server, so they cannot be used in applications like phpMyAdmin.



来源:https://stackoverflow.com/questions/40454553/mysql-tee-syntax-not-working

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!