How to output oracle sql result into a file in windows?
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 … Read more