0

I have a file called scripts.sql which contains a huge amount of sql queries, here is the first few lines of the file:

alter table companies change ...... ;
insert into addresses values (.....);
update users set blabla = 'blabla'......;

I want to know if in some way I can execute all the queries in this file with java.

I am using MySQL database.

Shahe
  • 964
  • 2
  • 13
  • 34

1 Answers1

0

You can use Ibatis runner to execute a sql script file. It's explained here Running SQL files scripts from a Java program

I hope this wil help

Community
  • 1
  • 1
Pracede
  • 4,226
  • 16
  • 65
  • 110