I am working in a java environment. I have one sql script which I have exported through Mysql Workbench. I want to import that sql script file through java code into MysqlWorkbench. How can I achieve it?
Asked
Active
Viewed 463 times
0
-
do you want to import it into a database? – XtremeBaumer Apr 24 '17 at 11:27
-
no that sql script itself contains multiple database I want to import that file. – Tushar Deshpande Apr 24 '17 at 11:28
-
yeah but where? i guess you want to have access to the databases and therefore, they have to be embedded in an DBMS – XtremeBaumer Apr 24 '17 at 11:30
-
Yes want to import in Mysql workbench – Tushar Deshpande Apr 24 '17 at 11:31
-
Possible duplicate of [How to execute sql-script file in java?](http://stackoverflow.com/questions/2071682/how-to-execute-sql-script-file-in-java) – Luud van Keulen Apr 24 '17 at 11:32
-
You have exported is as a sql file and you want to execute it using java? – Luud van Keulen Apr 24 '17 at 11:32
-
is it another mysql workbench than the one you exported it from? – XtremeBaumer Apr 24 '17 at 11:34
-
Yes through java code. I have already tried the link you mentioned in comment but I want to achieve without specifying database name. – Tushar Deshpande Apr 24 '17 at 11:35
-
@XtremeBaumer no in same Mysql workbench – Tushar Deshpande Apr 24 '17 at 11:35
-
why not leave it there and not try to do anything with java? – XtremeBaumer Apr 24 '17 at 11:36