Spool Command: Do not output SQL statement to file

后端 未结 5 847
闹比i
闹比i 2020-11-28 12:22

I am wanting to output a Query to a CSV file and am using the below as a small test;

spool c:\\test.csv 
select /*csv*/ username, user_id, created from all_u         


        
5条回答
  •  半阙折子戏
    2020-11-28 12:40

    Exec the query in TOAD or SQL DEVELOPER

    ---select /*csv*/ username, user_id, created from all_users;
    

    Save in .SQL format in "C" drive

    --- x.sql
    

    execute command

    ---- set serveroutput on
         spool y.csv
         @c:\x.sql
         spool off;
    

提交回复
热议问题