Oracle write to file

前端 未结 5 888
礼貌的吻别
礼貌的吻别 2021-01-06 03:18

I am running oracle and have a query which pulls some results from the database. I would like to write the results as a text file. How would I go about doing this?

M

5条回答
  •  無奈伤痛
    2021-01-06 04:10

    If you're running the query from sqlplus you can use the spool command:

    spool /tmp/test.spool
    

    After executing the spool command within a session, all output is sent to the sqlplus console as well as the /tmp/test.spool text file.

提交回复
热议问题