@echo off
set sql_exe="C:\Program Files\MySQL\MySQL Server 5.1\bin\mysql.exe"
set sql_options=-user root -password amma
set sql_db="C:\Documents and Settings\All Users\Application Data\MySQL\MySQL Server 5.1\data\aview"
set count=1
for /f "delims=" %%a in (input.sql) do (
echo %%a > temp.sql
call :processtemp_sql
)
goto :eof
:processtemp_sql
%sql_exe% %sql_options% -i temp.sql -o output%count%.txt %sql_db%
set /A count=%count%+1
goto :eof
:eof
input.sql 有一个 sql 查询
从状态中选择 *;