要把记录数写到LOG文件里。

解决方案 »

  1.   

    spool log.txt
    select count(*) from table;
    spool off
      

  2.   

    spool test.txt
    select * from test
    spool off
    把数据导出到文本文件后,向LOG文件里写导出的记录数。LOG文件里还有其他内容,如果用spool把件数导出到LOG文件的话,LOG文件利的内容就被覆盖掉了。
      

  3.   

    For UNIX or Linux.spool temp.txt
    your_sql;
    spool off
    host cat temp.txt >> your_file.txt
    host rm temp.txtFor Windows.spool temp.txt
    your_sql;
    spool off
    host type temp.txt >> your_file.txt
    host del temp.txt