example of statemnt.sql:
SELECT field1, field2, field3 INTO OUTFILE "/tmp/result.text"
FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
LINES TERMINATED BY "\n"
test running the file runsql.bat from your command line until you get the right output and then have a scheduler run it for you at 15th monthly
Originally posted by qha_vn
i am rewarded hearing that.
I'm using mysql on a linux based machine. I'm trying to create a script that will export all tables within a certain database to text files(one for each table). I understand that you can output each table individually by using:
select from <table name> into outfile '</path/filename'>;
Any suggestions on how I may automate the whole process within a script? Perhaps using a counter till end of database..etc...?
And is it possible to create insert statements for the table? I want to move some MySQL data to some other database and hence wanted insert statements created so that I can run these against the different database.