-1

I have created a script which is containing one query and , that query output should print in a spool file.

spool D:\sqlpractice\abcd

it creates the abcd file but that output data is not printing on that file. that output of query is printing on the sqlplus command prompt.

how to save that data in spooled file?

Sudarshan
  • 367
  • 2
  • 8
  • 20

1 Answers1

0

You need to use spool off, at that moment the output gets saved to the spoolfile.
For example:

spool D:\sqlpractice\abcd
SELECT * FROM Dual; 
spool off; 
Tenzin
  • 2,415
  • 2
  • 23
  • 36