Oracle中:
> sqlplus> Spool C:\temp\table_names
> sqlplus> select table_name from user_tables;
> sqlplus> spool off;
MySQL中:
mysql> tee c:\trash\qwe.txt
mysql> show tables;
mysql> notee
或
C:MySQL\MySQL Server\bin>mysql -u root -p --tee=c:\trash\qwe.txt
...
mysql> notee
如果qwe.txt文件存在,会将输出内容追加到文件内容末尾