How can I issue a single command from the command line through sql plus?

后端 未结 6 1322
半阙折子戏
半阙折子戏 2020-12-02 12:03

Using SQL Plus, you can run a script with the \"@\" operator from the command line, as in:

c:\\>sqlplus username/password@databasename @\         


        
6条回答
  •  伪装坚强ぢ
    2020-12-02 12:40

    I'm able to run an SQL query by piping it to SQL*Plus:

    @echo select count(*) from table; | sqlplus username/password@database
    

    Give

    @echo execute some_procedure | sqlplus username/password@databasename
    

    a try.

提交回复
热议问题