List:General Discussion« Previous MessageNext Message »
From:Eugene Kosov Date:April 1 2009 2:49pm
Subject:Re: Include SQL files
View as plain text  
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
> <sql06@stripped> 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=1
>>
>>
> 
> 
> 


-- 
С уважением,
Евгений Косов
Thread
Include SQL filesJørn Dahl-Stamnes1 Apr
  • Re: Include SQL filesMichael Dykman1 Apr
    • Re: Include SQL filesEugene Kosov1 Apr
      • Re: Include SQL filesJørn Dahl-Stamnes1 Apr