abc.txt为什么一直为空

解决方案 »

  1.   

    C:\>echo select object_id from user_objects where rownum ^<=5; > test.sqlC:\>type test.sql
    select object_id from user_objects where rownum <=5;C:\>type abc.txt
    系统找不到指定的文件。C:\>sqlplus "/as sysdba"SQL*Plus: Release 11.2.0.4.0 Production on 星期四 3月 22 15:25:38 2018Copyright (c) 1982, 2013, Oracle.  All rights reserved.
    连接到:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing optionsSQL> spool c:\abc.txt
    SQL> @c:\test.sql; OBJECT_ID
    ----------
         44150
         56752
         22530
         42062
         20058SQL> spool off
    SQL> exit
    从 Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options 断开C:\>type abc.txt
    SQL> @c:\test.sql; OBJECT_ID
    ----------
         44150
         56752
         22530
         42062
         20058SQL> spool offC:\>