What about source?

use foobar;

source some/dir/file1.sql;
source some/dir/file2.sql;
...


Though, your solution is much simplier.


Michael Dykman wrote:
No include is possible, but this is done pretty routinely:

cat *.sql | mysql ...

 - michael dykman


On Wed, Apr 1, 2009 at 10:19 AM, Jørn Dahl-Stamnes
<sq...@dahl-stamnes.net> wrote:
Hello,

After googling for an hour I gave up to find a solution.

Problem: A framework is creating a lot of SQL files that will create the
database. But I'm tired of doing 10-20-30 'mysql -u... < file<n>.sql' each
time I rebuild the model.

What I want to do is to create a sql file like:

use foobar;

include some/dir/file1.sql
include some/dir/file2.sql
...
and so on.

Is it possible?


--
Jørn Dahl-Stamnes
homepage: http://www.dahl-stamnes.net/dahls/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=mdyk...@gmail.com







--
С уважением,
Евгений Косов

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to