我想在Oracle 11g中使用假脫機功能。在Oracle 11g中使用假脫機
我希望將整個輸出假脫機到一個文件中,並將輸出的子集假脫機到一個單獨的文件中。
在下面的例子中,我想temp_1.txt
含有從A,B,C,d的數據和E
在temp_2.txt
我想數據只爲D.
sqlplus user/[email protected]
spool on temp_1.txt
select * from A;
select * from B;
select * from C;
spool on temp_2.txt
select * from D;
spool off temp_2.txt
select * from E;
exit;
注: -由於這是非常古老的遺留代碼,我不能爲D編寫單獨的sqlplus會話或重新排序選擇。