0

当我输入:

C:\>sqlplus user/pass@OMP1 @CheckRowCount.sql

它连接但我没有看到任何结果,在 .sql 文件中我有这个:

SELECT COUNT(*) as "rowcount" FROM dmsn.ds3r_1xrtt_voice_trigger;

我也试过这个

C:\>sqlplus user/pass@OMP1 SELECT COUNT(*) as "rowcount" FROM dmsn.ds3r_1xrtt_voice_trigger;

但我得到的只是在 CMD 窗口中使用的 sql*plus 命令

4

1 回答 1

0

You don't get anything in this way, if you want result from a script you must add a spool command to you script.

spo result.txt;

SELECT COUNT(*) as "rowcount" FROM dmsn.ds3r_1xrtt_voice_trigger;

spo off;

Then execute C:\>sqlplus user/pass@OMP1 @CheckRowCount.sql and open result.txt to see result.

Anyway for single script like this above just put it in sql> prompt and see what happens.

于 2013-04-19T19:03:46.623 回答