want to run multiple SQL script file in one go with in SQLPLUS

后端 未结 8 659
陌清茗
陌清茗 2021-02-05 23:14

I have to run multiple SQL script file in one go.

Like every time i have to write command in SQLPLUS

SQL>@d:\\a.txt 
SQL>@d:\\a2.txt
SQL>@d:\\a3.txt
SQL>@d:\\         


        
8条回答
  •  情歌与酒
    2021-02-05 23:45

    here is similar solution but you do not have to iterate and to have special formated an sql file names. You compose an one sql file and run it once.

    cat table_animal.sql > /tmp/temp.sql
    cat table_horse.sql >> /tmp/temp.sql
    cat table_fish.sql >> /tmp/temp.sql
    sqlplus USERNAME/PASSWORD@DOMAIN @/tmp/temp.sql
    

提交回复
热议问题