Suppose, We have three files in our release package.
Now, I want to create one single file that executes all these files. So users need not to execute all file statements one by one.
Database Environment - Oracle 12c
Not too complicated; name all those scripts in the "master" script, with their names preceded by the @
sign.
For example, I have created 3 scripts: a.sql
, b.sql
and c.sql
. All of them look similar, i.e. they just display where I am:
select 'this is script A' what from dual;
run_all.sql
looks like this:
@a
@b
@c
Let's test it:
SQL> @run_all
WHAT
----------------
this is script A
WHAT
----------------
this is script B
WHAT
----------------
this is script C
SQL>
See if it helps.