Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

script to run multiple scripts in Oracle

969952Apr 29 2014 — edited Apr 30 2014

Hi All,

I have around 20 sql scripts. I want to keep it in single .SQL file.

If I execute .SQL ( main script) the scripts which are existed in main file should execute in sequence.

I would like to execute these script from SQL plus. Can you please suggest me how can I keep all these scripts in single .SQL.

Here is the example:

Script1.sql :

create table < table_name>

( col1 ..

col2..)

alter table <table_name>

create or replace procedure <porocedure name>

....

...

script 2.sql

   alter table1 <>

   alter table2  <>

    create View <>

Script3.sql

create view <>
  create function <>

like this I have 3 script<>.sql s. Now I would like to create "Main_Script.SQL" If I execute this script
SQL>Main_Script.sql

then the script1.sqll, script2.sql, script3.sql should run in sequence.

can you please suggeste me how can I keep these statmnents in Sequence.

Thanks


Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 28 2014
Added on Apr 29 2014
6 comments
11,144 views