MySQL Forums
Forum List  »  MySQL Workbench

Re: Running multiple sql files
Posted by: Peter Brawley
Date: April 24, 2019 09:22PM

The short answer is recursion: write a script that invokes other scripts.

Have a look at the manual pages for the mysql client program. Its command to run sql script c:/sqldir/scrip1.sql is ..

source c:/sqldir/scrip1.sql

Note, no terminating semicolon. You can write a script that does something like the following sequence for each of 260 scripts ...

source c:/sqldir/scrip1.sql
show create table table1;

... and if the mysql client program iks called with the --tee option you will have a text file of results so you can fix errors that occurred.

You can run a similar script in WorkBench, see its manual pages for how.

Options: ReplyQuote


Subject
Views
Written By
Posted
1204
April 23, 2019 11:55AM
536
April 24, 2019 06:51PM
442
April 24, 2019 08:16PM
Re: Running multiple sql files
461
April 24, 2019 09:22PM
347
April 25, 2019 05:30PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.