[t@oops-nihao10~]$ -e 'select * from student;'>E:/sql/test.txt
-bash: E:/sql/test.txt: No such file or directory
这是刚才执行的。我没有进入MySQL,在跳板机上层执行的。我还直接在E:/sql里建了test.txt,执行是这个
-bash: -e: command not found
[t@oops-nihao10~]$ -e 'select * from student' group by hp having cnt>1;'>E:/sql/test.txt
-bash: E:/sql/test.txt: No such file or directory
这是刚才执行的。我没有进入MySQL,在跳板机上层执行的。我还直接在E:/sql里建了test.txt,执行是这个
-bash: -e: command not found
mysql> -e 'select * from student;'>E:/sql/test.txt
-> ;
ERROR 1064 (42000): 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 '-e 'select * from student' at line 1