views:

48

answers:

1

I have a database that I need to maintain in both oracle and mysql. The data insert script of scripts looks like below. Of course Mysql uses source while oracle uses @ In all other respects the scripts invoked and their order of invocation are identical. (That's because they are just ANSI compliant insert statements).

Is there anyway to modify the script of scripts so it works in both mysql and oracle?


-- In mysql
use mydb;
source insert_man_rows.sql
source insert_leg_rows.sql

-- In oracle
@ insert_man_rows.sql
@ insert_leg_rows.sql

A: 

You can create a proto-script that will contain just the names of sub-scripts, and then process it for database you're currently using some simple script.

che