How to output oracle sql result into a file in windows?
问题 I tried select * from users save D:\test.sql create; But SQL plus gives me "no proper ended" How to specify path in oracle sql in windows? 回答1: Use the spool: spool myoutputfile.txt select * from users; spool off; Note that this will create myoutputfile.txt in the directory from which you ran SQL*Plus. If you need to run this from a SQL file (e.g., "tmp.sql") when SQLPlus starts up and output to a file named "output.txt": tmp.sql: select * from users; Command: sqlplus -s username/password@sid