Home  >  Article  >  Database  >  Mysql method to execute sql files in batches_MySQL

Mysql method to execute sql files in batches_MySQL

WBOY
WBOYOriginal
2016-11-30 23:59:351008browse

1. The sql files to be executed are 1.sql, 2.sql, 3.sql, 4.sql, etc.

2. Write a batch.sql file:

source 1.sql;
source 2.sql;
source 3.sql;
source 4.sql;

3. Execute source/batch file directory/batch.sql under mysql;

The above is the entire method of mysql batch execution of sql files brought to you by the editor. I hope you will support it~

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn