Click to See Complete Forum and Search --> : running multiple mysql queries


vicious
06-01-2003, 09:41 AM
Okay, I have a file (queries.txt) and on each line, there is a query.
I want to know how to run they all, one after the other, without having to key in each query.
There are 18 queries and at least 1800 characters, 100 characters per query, and I don't fancy typing each out

khalidali63
06-01-2003, 10:20 AM
Interesting...
I know in the Oracle,
Save the text file as queries.sql
then you open up the SQL Plus
and write this

@queries.sql

It will run the file and it will run all of the queries one after the another.
I have no Idea how would it work in other,you can try though,since the main parts of SQL syntax are common amongst all apps..

vicious
06-01-2003, 07:33 PM
thanks, but it doesn't work

AdamGundry
06-02-2003, 02:10 AM
This might be useful:
http://www.mysql.com/doc/en/Batch_mode.html

Adam